File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 11const path = require ( 'path' ) ;
22
33exports . default = [
4+ // '.babelrc',
45 '.gitignore' ,
56 'package.json' ,
67 'README.md' ,
7- 'src/.babelrc' ,
88 'src/assets/favicon.ico' ,
99 'src/assets/icons/android-chrome-192x192.png' ,
1010 'src/assets/icons/android-chrome-512x512.png' ,
@@ -22,8 +22,8 @@ exports.default = [
2222 'src/routes/profile/index.js' ,
2323 'src/routes/profile/style.css' ,
2424 'src/style/index.css' ,
25- 'src/ tests/__mocks__/browserMocks.js' ,
26- 'src/ tests/__mocks__/fileMocks.js' ,
27- 'src/ tests/header.test.js'
25+ 'tests/__mocks__/browserMocks.js' ,
26+ 'tests/__mocks__/fileMocks.js' ,
27+ 'tests/header.test.js'
2828] . map ( s => s . replace ( / \/ / g, path . sep ) ) ;
2929
Original file line number Diff line number Diff line change 1- const mkdirp = require ( 'mkdirp' ) ;
21const { join } = require ( 'path' ) ;
2+ const { existsSync, unlinkSync } = require ( 'fs' ) ;
33const cmd = require ( '../../lib/commands' ) ;
44const { tmpDir } = require ( './output' ) ;
5+ const mkdirp = require ( 'mkdirp' ) ;
56
67const argv = {
78 _ : [ ] ,
@@ -14,7 +15,15 @@ const argv = {
1415exports . create = async function ( template , name ) {
1516 let dest = tmpDir ( ) ;
1617 name = name || `test-${ template } ` ;
18+
1719 await cmd . create ( template , dest , { name, cwd :'.' } ) ;
20+
21+ // TODO: temporary – will resolve after 2.x->3.x release
22+ // Templates are using 2.x, which needs `.babelrc` for TEST modification.
23+ // The 3.x templates won't need `.babelrc` for { modules: commonjs }
24+ let babelrc = join ( dest , '.babelrc' ) ;
25+ existsSync ( babelrc ) && unlinkSync ( babelrc ) ;
26+
1827 return dest ;
1928} ;
2029
You can’t perform that action at this time.
0 commit comments