Skip to content

Instantly share code, notes, and snippets.

@bittersweetryan
Created April 25, 2013 17:42
Show Gist options
  • Save bittersweetryan/5461592 to your computer and use it in GitHub Desktop.
Save bittersweetryan/5461592 to your computer and use it in GitHub Desktop.
Grunt Handlebars Plugin Configuration to make the template the filename (minus extension) and put them in Hanlebars.templates.
handlebars: {
options: {
namespace : 'Handlebars.templates',
processName : function ( filename ){
var fileParts = filename.split('/');
return fileParts.slice( fileParts.length-1 )[0].split( '.' )[0];
}
},
compile: {
files: {
'assets/templates_c/dashboard.js' : 'assets/templates/dashboard.hbs',
'assets/templates_c/financial-assets-summary.js' : 'assets/templates/financial-assets-summary.hbs'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment