Skip to content

Instantly share code, notes, and snippets.

@chris-brown
Created December 23, 2014 23:05
Show Gist options
  • Save chris-brown/188ec32bd15ac8878a68 to your computer and use it in GitHub Desktop.
Save chris-brown/188ec32bd15ac8878a68 to your computer and use it in GitHub Desktop.
grunt-handlebars-compiler Gruntfile.js
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
handlebars: {
compile: {
src: 'templates/*.handlebars',
dest: 'scripts/handlebars-templates.js'
}
},
watch: {
handlebars: {
files: ['<%= handlebars.compile.src %>'],
tasks: ['handlebars:compile']
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-handlebars-compiler');
// Default task(s).
grunt.registerTask('default', ['handlebars']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment