Skip to content

Commit 23e5d77

Browse files
committed
feat(app): use lowercase file names
All file names should be lowercase. Names in the app should follow the existing rules Fixes #463
1 parent 11cb994 commit 23e5d77

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

Diff for: route/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Generator.prototype.rewriteAppJs = function () {
2222
),
2323
needle: '.otherwise',
2424
splicable: [
25-
" templateUrl: 'views/" + this.name + ".html'" + (coffee ? "" : "," ),
25+
" templateUrl: 'views/" + this.name.toLowerCase() + ".html'" + (coffee ? "" : "," ),
2626
" controller: '" + this.classedName + "Ctrl'"
2727
]
2828
};

Diff for: script-base.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,21 @@ util.inherits(Generator, yeoman.generators.NamedBase);
7171
Generator.prototype.appTemplate = function (src, dest) {
7272
yeoman.generators.Base.prototype.template.apply(this, [
7373
src + this.scriptSuffix,
74-
path.join(this.env.options.appPath, dest) + this.scriptSuffix
74+
path.join(this.env.options.appPath, dest.toLowerCase()) + this.scriptSuffix
7575
]);
7676
};
7777

7878
Generator.prototype.testTemplate = function (src, dest) {
7979
yeoman.generators.Base.prototype.template.apply(this, [
8080
src + this.scriptSuffix,
81-
path.join(this.env.options.testPath, dest) + this.scriptSuffix
81+
path.join(this.env.options.testPath, dest.toLowerCase()) + this.scriptSuffix
8282
]);
8383
};
8484

8585
Generator.prototype.htmlTemplate = function (src, dest) {
8686
yeoman.generators.Base.prototype.template.apply(this, [
8787
src,
88-
path.join(this.env.options.appPath, dest)
88+
path.join(this.env.options.appPath, dest.toLowerCase())
8989
]);
9090
};
9191

Diff for: view/index.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,12 @@ var Generator = module.exports = function Generator() {
1919
util.inherits(Generator, yeoman.generators.NamedBase);
2020

2121
Generator.prototype.createViewFiles = function createViewFiles() {
22-
this.template('common/view.html', path.join(this.env.options.appPath, 'views', this.name + '.html'));
22+
this.template(
23+
'common/view.html',
24+
path.join(
25+
this.env.options.appPath,
26+
'views',
27+
this.name.toLowerCase() + '.html'
28+
)
29+
);
2330
};

0 commit comments

Comments
 (0)