Commit 4f25dd5 1 parent 90a2a20 commit 4f25dd5 Copy full SHA for 4f25dd5
File tree 2 files changed +14
-5
lines changed
2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 1
1
const path = require ( 'path' ) ;
2
2
3
3
exports . default = [
4
+ // '.babelrc',
4
5
'.gitignore' ,
5
6
'package.json' ,
6
7
'README.md' ,
7
- 'src/.babelrc' ,
8
8
'src/assets/favicon.ico' ,
9
9
'src/assets/icons/android-chrome-192x192.png' ,
10
10
'src/assets/icons/android-chrome-512x512.png' ,
@@ -22,8 +22,8 @@ exports.default = [
22
22
'src/routes/profile/index.js' ,
23
23
'src/routes/profile/style.css' ,
24
24
'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'
28
28
] . map ( s => s . replace ( / \/ / g, path . sep ) ) ;
29
29
Original file line number Diff line number Diff line change 1
- const mkdirp = require ( 'mkdirp' ) ;
2
1
const { join } = require ( 'path' ) ;
2
+ const { existsSync, unlinkSync } = require ( 'fs' ) ;
3
3
const cmd = require ( '../../lib/commands' ) ;
4
4
const { tmpDir } = require ( './output' ) ;
5
+ const mkdirp = require ( 'mkdirp' ) ;
5
6
6
7
const argv = {
7
8
_ : [ ] ,
@@ -14,7 +15,15 @@ const argv = {
14
15
exports . create = async function ( template , name ) {
15
16
let dest = tmpDir ( ) ;
16
17
name = name || `test-${ template } ` ;
18
+
17
19
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
+
18
27
return dest ;
19
28
} ;
20
29
You can’t perform that action at this time.
0 commit comments