Skip to content

Instantly share code, notes, and snippets.

@kevcjones-archived
Last active December 10, 2015 23:48
Show Gist options
  • Save kevcjones-archived/4512036 to your computer and use it in GitHub Desktop.
Save kevcjones-archived/4512036 to your computer and use it in GitHub Desktop.
yeoman-ember-handlebars not quite as simple if your using YEOMAN scaffolding - self reminder on what got me (since i'm new to grunt / npm etc etc)
The Grunt.js isn't handlebars ready - folling on from my last hiccups stuff
https://gist.github.com/4503821
//Turns out i need to hookup and write up the grunt stuff.
1. Install https://github.com/dgeb/grunt-ember-templates
2. Update the gruntfile
3. https://github.com/dgeb/grunt-ember-templates/issues/7 this was my issue, make sure you only use 0.2.0 until yeoman uses 0.4 grunt
4. https://github.com/dgeb/yeoman-ember-basic-example/ - follow these guys for setup tips and files...
My edits to Gruntfile
ember_templates: {
compile: {
options: {
templateName: function(sourceFile) {
return sourceFile.replace(/app\/scripts\/templates\//, '');
}
},
files: {
'app/scripts/templates.js': 'app/scripts/templates/**/*.handlebars'
}
}
},
// default watch configuration
...
ember_templates: {
files: 'app/scripts/templates/**/*.handlebars',
tasks: 'ember_templates reload'
},
...
//clean edits
grunt.renameTask('clean', 'yeoman-clean');
grunt.registerTask('clean', 'yeoman-clean ember_templates');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment