File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ exports.usage = "项目初始化";
10
10
exports . setOptions = ( optimist ) => { } ;
11
11
12
12
exports . run = function ( options ) {
13
+ Manager . reloadRC ( )
13
14
14
15
let cwd = options . cwd ,
15
16
projectName = options . _ [ 1 ] ,
@@ -42,8 +43,6 @@ exports.run = function (options) {
42
43
43
44
answers . name = answers . name || defaultName
44
45
45
- console . log ( 'answers.name' , answers . name ) ;
46
-
47
46
// 如果没有package.json,先添加package.json
48
47
if ( answers . name ) {
49
48
fs . createReadStream ( sysPath . resolve ( initTmplPath , 'package.json' ) )
@@ -53,12 +52,12 @@ exports.run = function (options) {
53
52
54
53
// 添加qunar.xxx.js
55
54
if ( answers . type ) {
56
- log ( 'installing ' + packageName + '...' ) ;
57
-
58
55
const packageName = 'ykit-config-' + answers . type ,
59
56
configFileName = 'ykit.' + answers . type + '.js' ,
60
57
installCmd = 'npm i --save git+ssh://git@gitlab.corp.qunar.com:mfe/ykit-config-' + answers . type + '.git' ;
61
58
59
+ log ( 'installing ' + packageName + '...' ) ;
60
+
62
61
if ( ! fileExists ( './' + configFileName ) ) {
63
62
fs . createReadStream ( sysPath . resolve ( initTmplPath , 'ykit.common.js' ) )
64
63
. pipe ( replaceStream ( '#_name' , answers . name ) )
Original file line number Diff line number Diff line change @@ -114,8 +114,6 @@ exports.getCommands = () => {
114
114
let readRC = exports . readRC = ( ) => {
115
115
try {
116
116
return JSON5 . parse ( fs . readFileSync ( YKIT_RC , 'UTF-8' ) ) ;
117
- } catch ( e ) {
118
- warn ( '读取 .ykitrc 失败!' ) ;
119
117
}
120
118
return { }
121
119
} ;
You can’t perform that action at this time.
0 commit comments