Last active
December 23, 2015 07:09
-
-
Save jkneb/6599001 to your computer and use it in GitHub Desktop.
grunt-ember-templates plugin configuration for the Gruntfile + package.json. You'll have to update the Gruntfile with YOUR correct path to templates files. 1. Run `npm install` 2. Run `grunt` or `grunt watch`
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' ), | |
emberTemplates: { | |
compile: { | |
options: { | |
templateBasePath: /assets\/js\/app\/templates\// | |
}, | |
files: { | |
'assets/js/app/templates.js': 'assets/js/app/templates/**/*.hbs' | |
} | |
} | |
}, | |
watch: { | |
emberTemplates: { | |
files: 'assets/js/app/templates/**/*.hbs', | |
tasks: ['emberTemplates'] | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-ember-templates'); | |
// Default task(s). | |
grunt.registerTask('default', ['emberTemplates']); | |
}; |
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
{ | |
"name": "Your-Name-App-Hiphenated", | |
"description": "Write what u want", | |
"version": "0.0.1", | |
"private": true, | |
"devDependencies": { | |
"grunt": "~0.4.1", | |
"grunt-contrib-watch": "~0.4.4", | |
"grunt-ember-templates": "*" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For the watch task to work it needs to be set in the registerTask function as well