diff --git a/route/index.js b/route/index.js index 2c653c601..f30d60939 100644 --- a/route/index.js +++ b/route/index.js @@ -22,7 +22,7 @@ Generator.prototype.rewriteAppJs = function () { ), needle: '.otherwise', splicable: [ - " templateUrl: 'views/" + this.name + ".html'" + (coffee ? "" : "," ), + " templateUrl: 'views/" + this.name.toLowerCase() + ".html'" + (coffee ? "" : "," ), " controller: '" + this.classedName + "Ctrl'" ] }; diff --git a/script-base.js b/script-base.js index 4785cfd56..32bd81756 100644 --- a/script-base.js +++ b/script-base.js @@ -71,21 +71,21 @@ util.inherits(Generator, yeoman.generators.NamedBase); Generator.prototype.appTemplate = function (src, dest) { yeoman.generators.Base.prototype.template.apply(this, [ src + this.scriptSuffix, - path.join(this.env.options.appPath, dest) + this.scriptSuffix + path.join(this.env.options.appPath, dest.toLowerCase()) + this.scriptSuffix ]); }; Generator.prototype.testTemplate = function (src, dest) { yeoman.generators.Base.prototype.template.apply(this, [ src + this.scriptSuffix, - path.join(this.env.options.testPath, dest) + this.scriptSuffix + path.join(this.env.options.testPath, dest.toLowerCase()) + this.scriptSuffix ]); }; Generator.prototype.htmlTemplate = function (src, dest) { yeoman.generators.Base.prototype.template.apply(this, [ src, - path.join(this.env.options.appPath, dest) + path.join(this.env.options.appPath, dest.toLowerCase()) ]); }; diff --git a/view/index.js b/view/index.js index 6de914e8a..7d630509b 100644 --- a/view/index.js +++ b/view/index.js @@ -19,5 +19,12 @@ var Generator = module.exports = function Generator() { util.inherits(Generator, yeoman.generators.NamedBase); Generator.prototype.createViewFiles = function createViewFiles() { - this.template('common/view.html', path.join(this.env.options.appPath, 'views', this.name + '.html')); + this.template( + 'common/view.html', + path.join( + this.env.options.appPath, + 'views', + this.name.toLowerCase() + '.html' + ) + ); };