File tree 5 files changed +1456
-2982
lines changed
5 files changed +1456
-2982
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env node
2
2
'use strict'
3
3
4
- const compatRequire = require ( 'node-compat-require' )
5
- compatRequire ( './lib' , { node : '>= 8' } )
4
+ require ( './lib/cli' )
File renamed without changes.
Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ const pEachSeries = require('p-each-series')
11
11
12
12
const pkg = require ( '../package' )
13
13
14
+ const templateBlacklist = new Set ( [
15
+ 'example/public/favicon.ico'
16
+ ] )
17
+
14
18
module . exports = async ( info ) => {
15
19
const {
16
20
manager,
@@ -75,14 +79,20 @@ module.exports.copyTemplateFile = async (opts) => {
75
79
const destFilePath = path . join ( dest , fileRelativePath )
76
80
const destFileDir = path . parse ( destFilePath ) . dir
77
81
78
- const template = handlebars . compile ( fs . readFileSync ( file , 'utf8' ) )
79
- const content = template ( {
80
- ...info ,
81
- yarn : ( info . manager === 'yarn' )
82
- } )
83
-
84
82
await mkdirp ( destFileDir )
85
- fs . writeFileSync ( destFilePath , content , 'utf8' )
83
+
84
+ if ( templateBlacklist . has ( fileRelativePath ) ) {
85
+ const content = fs . readFileSync ( file )
86
+ fs . writeFileSync ( destFilePath , content )
87
+ } else {
88
+ const template = handlebars . compile ( fs . readFileSync ( file , 'utf8' ) )
89
+ const content = template ( {
90
+ ...info ,
91
+ yarn : ( info . manager === 'yarn' )
92
+ } )
93
+
94
+ fs . writeFileSync ( destFilePath , content , 'utf8' )
95
+ }
86
96
87
97
return fileRelativePath
88
98
}
Original file line number Diff line number Diff line change 30
30
" publish"
31
31
],
32
32
"dependencies" : {
33
- "chalk" : " 2.4.1 " ,
34
- "commander" : " ^2.16 .0" ,
35
- "conf" : " ^2.0 .0" ,
33
+ "chalk" : " ^ 2.4.2 " ,
34
+ "commander" : " ^2.19 .0" ,
35
+ "conf" : " ^2.2 .0" ,
36
36
"cp-file" : " ^6.0.0" ,
37
- "execa" : " ^0.10 .0" ,
38
- "git-config-path" : " ^1 .0.1 " ,
37
+ "execa" : " ^1.0 .0" ,
38
+ "git-config-path" : " ^2 .0.0 " ,
39
39
"github-username" : " ^4.1.0" ,
40
- "globby" : " ^8.0.1" ,
41
- "handlebars" : " ^4.0.11" ,
42
- "inquirer" : " ^6.0.0" ,
43
- "make-dir" : " ^1.3.0" ,
44
- "node-compat-require" : " ^1.0.5" ,
45
- "ora" : " ^3.0.0" ,
40
+ "globby" : " ^9.0.0" ,
41
+ "handlebars" : " ^4.1.0" ,
42
+ "inquirer" : " ^6.2.2" ,
43
+ "make-dir" : " ^2.0.0" ,
44
+ "ora" : " ^3.1.0" ,
46
45
"p-each-series" : " ^1.0.0" ,
47
- "parse-git-config" : " ^2 .0.2 " ,
46
+ "parse-git-config" : " ^3 .0.0 " ,
48
47
"validate-npm-package-name" : " ^3.0.0" ,
49
48
"which" : " ^1.3.1"
50
49
},
51
50
"devDependencies" : {
52
- "ava" : " ^0.25.0 " ,
51
+ "ava" : " ^1.2.1 " ,
53
52
"rmfr" : " ^2.0.0" ,
54
- "standard" : " ^11 .0.1"
53
+ "standard" : " ^12 .0.1"
55
54
}
56
55
}
You can’t perform that action at this time.
0 commit comments