Created
July 1, 2013 18:50
-
-
Save chonthu/5903494 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
handlebars: { | |
compile: { | |
options: { | |
namespace: "Handlebars.templates", | |
processName: function(filepath) { | |
var pieces = filepath.split("/"); | |
return pieces[pieces.length - 1].replace(/.handlebars$/ , ''); | |
} | |
}, | |
files: { | |
"htdocs/js/template.js": "templates/handlebars/*.handlebars" | |
} | |
} | |
}, | |
watch: { | |
default: { | |
files: "templates/handlebars/*.handlebars", | |
tasks: ['handlebars'] | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-contrib-handlebars'); | |
grunt.registerTask('default', ['handlebars']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment