yeoman init angular:directive foobar error
Centos 6.2 Yeoman 0.9.4
In yeoman-test directory (from tutorial)
yeoman init angular:directive foobar Running "init:yeoman" (init) task This task will create one or more files in the current directory, based on the environment and the answers to a few questions. Note that answering "?" to any question will show question-specific help and answering "none" to most questions will leave its value blank.
"yeoman" template notes:
invoke angular:directive
Aborted due to warnings.
To get it working I did this: 12c12 < this.sourceRoot(path.join(__dirname, '../templates')); --- > this.sourceRoot(path.join(__dirname, '../templates/javascript')); 20,21c20,21 < this.template('directive.js', 'app/scripts/directives/' + this.name); < this.template('spec/directive.js', 'test/spec/directives/' + this.name); --- > this.template('directive', 'app/scripts/directives/' + this.name); > this.template('spec/directive', 'test/spec/directives/' + this.name);
This is working find in 0.9.5 (npm update -g yeoman).
//These two lines:
ScriptBase = require('../script-base.js'),
ScriptBase.apply(this, arguments);
//set sourceRoot to templates/javascript or templates/coffeescript
this.template('directive', 'app/scripts/directives/' + this.name);
Thanks, updated and working