File tree Expand file tree Collapse file tree
test/fixtures/test-helpers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,13 +9,15 @@ var ComponentTemplateFileInfo = require('./component-template-file-info');
99var MainFileInfo = require ( './main-file-info' ) ;
1010var MixinFileInfo = require ( './mixin-file-info' ) ;
1111var ConfigFileInfo = require ( './config-file-info' ) ;
12+ var MiscFileInfo = require ( './misc-file-info' ) ;
1213
1314module . exports = {
1415 buildFor : function ( sourceRelativePath , options ) {
1516 var ext = path . extname ( sourceRelativePath ) ;
1617 var pathParts = sourceRelativePath . split ( '/' ) ;
18+ var filename = pathParts . slice ( - 1 ) [ 0 ] ;
1719
18- if ( pathParts . slice ( - 1 ) [ 0 ] === '.gitkeep' ) {
20+ if ( filename === '.gitkeep' ) {
1921 // ignore .gitkeep files
2022 return null ;
2123 }
@@ -24,6 +26,11 @@ module.exports = {
2426 var sourceRoot = options . sourceRoot = pathParts [ 0 ] ;
2527 var topLevelDirectory ;
2628
29+ if ( filename [ 0 ] === '.' && ext === '.js' ) {
30+ // keep js dotfiles in their original location
31+ return new MiscFileInfo ( options ) ;
32+ }
33+
2734 if ( sourceRoot === 'app' ) {
2835 options . base = 'src' ;
2936
Original file line number Diff line number Diff line change 1+ var ClassicFileInfo = require ( './classic-file-info' ) ;
2+
3+ var MiscFileInfo = ClassicFileInfo . extend ( {
4+ fileInfoType : 'MiscFileInfo' ,
5+
6+
7+ init : function ( options ) {
8+ // sourceRoot needs to be set before the super call so that non js files stay in place
9+ options . sourceRoot = '.' ;
10+ this . _super ( options ) ;
11+
12+ options . type = 'misc' ;
13+ } ,
14+
15+ populateCollection : function ( ) {
16+ this . collection = '..' ;
17+ this . collectionGroup = '' ;
18+ }
19+ } ) ;
20+
21+ module . exports = MiscFileInfo ;
Original file line number Diff line number Diff line change 11module . exports = {
22 app : {
33 'app.js' : '// app' ,
4- 'resolver.js' : '// resolver'
4+ 'resolver.js' : '// resolver' ,
5+ adapters : {
6+ '.eslint.js' : '{}'
7+ }
58 } ,
69 config : {
710 'environment.js' : '"ENV"'
811 } ,
912 tests : {
13+ '.eslintrc.js' : 'module.exports = {};' ,
1014 '.eslint.js' : '{}' ,
1115 'test-helper.js' : '{}' ,
1216 helpers : {
Original file line number Diff line number Diff line change 11module . exports = {
2+ app : {
3+ adapters : {
4+ '.eslint.js' : '{}'
5+ }
6+ } ,
27 src : {
38 'main.js' : '// app' ,
49 'resolver.js' : '// resolver'
@@ -7,6 +12,7 @@ module.exports = {
712 'environment.js' : '"ENV"'
813 } ,
914 tests : {
15+ '.eslintrc.js' : 'module.exports = {};' ,
1016 '.eslint.js' : '{}' ,
1117 'test-helper.js' : '{}' ,
1218 'helpers' : {
You can’t perform that action at this time.
0 commit comments