Skip to content

Commit 285375d

Browse files
committed
Ensure app/index.html is moved to src/init/index.html.
1 parent ec5bae6 commit 285375d

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

lib/engines/classic/main-file-info.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ var MainFileInfo = ClassicFileInfo.extend({
1818
this.collection = '';
1919

2020
if (ROOT_FILES.indexOf(this.name) > -1) {
21-
// do nothing
22-
} else if (this.ext === '.js' || this.ext === '.html') {
23-
this.collection = 'main';
21+
// do nothing (leave them in `src/` root)
22+
} else if (this.name === 'index' && this.ext === '.html') {
23+
this.collectionGroup = 'init';
2424
}
2525
},
2626

test/engines/classic-test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ describe('classic engine', function() {
4949
confirm('app/app.js', {type: 'main', name: 'main', namespace: '', collection: '', collectionGroup: ''});
5050
confirm('app/router.js', {type: 'main', name: 'router', namespace: '', collection: '', collectionGroup: ''});
5151
confirm('app/index.md', { name: 'index', namespace: '', collection: '', collectionGroup: '' });
52+
confirm('app/index.html', { name: 'index', namespace: '', collection: '', collectionGroup: 'init' });
5253
confirm('app/styles/app.css', { type: 'style', name: 'app', namespace: '', collection: 'styles', collectionGroup: 'ui' });
5354
confirm('app/styles/components/badges.css', { type: 'style', name: 'badges', namespace: 'components', collection: 'styles', collectionGroup: 'ui' });
5455
confirm('app/mixins/foo/bar.js', { type: 'util', name: 'bar', namespace: 'mixins/foo', collection: 'utils' });
@@ -81,7 +82,7 @@ describe('classic engine', function() {
8182
'app/router.js': 'src/router.js',
8283
'app/README.md': 'src/README.md',
8384
'app/_config.yml': 'src/_config.yml',
84-
'app/index.html': 'src/main/index.html',
85+
'app/index.html': 'src/init/index.html',
8586
'app/styles/app.css': 'src/ui/styles/app.css',
8687
'app/styles/components/badges.css': 'src/ui/styles/components/badges.css',
8788
'app/mirage/config.js': 'src/mirage/config.js',

test/fixtures/classic-acceptance/output.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ module.exports = {
99
},
1010
'instance-initializers': {
1111
'blammo.js': 'blammo instance initializer'
12-
}
13-
},
14-
'main': {
12+
},
1513
'index.html': 'index.html contents'
1614
},
1715
'ui': {

0 commit comments

Comments
 (0)