node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



converts source files (usually javascript) to handlebars files that have been run through highlight.js

Getting Started

This plugin requires Grunt ~0.4.0

Additionally, if you wish to use these handlebars files inside a project you will need to include one of the many .css files available for highlighting the outputted html from highlight.js.

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-showoff --save-dev

One the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:


The "showoff" task


In your project's Gruntfile, add a section named showoff to the data object passed into grunt.initConfig().

  showoff: {
    options: {
      lang: 'javascript',
    glob_to_multiple: {
      expand: true,
      cwd: 'where/your/files/are',
      src: ['**/*.js'],
      dest: 'where/your/output/goes',
      ext: '.handlebars',



Specify what language highlight.js will use to highlight your output. For example, 'javascript'. See highlight.js docs for exact names for each language.


Please submit issues/pull requests to the github repository for this project. Contributions are absolutely welcome!

Release History

May14, 2013 0.1.2