Skip to content

Commit

Permalink
feat(app): use lowercase file names
Browse files Browse the repository at this point in the history
All file names should be lowercase. Names in the app should follow the
existing rules

Fixes #463
  • Loading branch information
eddiemonge committed Dec 13, 2013
1 parent 11cb994 commit 23e5d77
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion route/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
]
};
Expand Down
6 changes: 3 additions & 3 deletions script-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -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())
]);
};

Expand Down
9 changes: 8 additions & 1 deletion view/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
)
);
};

0 comments on commit 23e5d77

Please sign in to comment.