Skip to content

Commit 18ac575

Browse files
committed
fix(init): 改为从gitlab上安装配置
1 parent ba32d22 commit 18ac575

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/commands/init.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,25 @@ exports.run = function (options) {
5353

5454
// 添加qunar.xxx.js
5555
if(answers.type) {
56+
log('installing ' + packageName + '...');
57+
5658
const packageName = 'ykit-config-' + answers.type,
57-
configFileName = 'ykit.' + answers.type + '.js'
59+
configFileName = 'ykit.' + answers.type + '.js',
60+
installCmd = 'npm i --save git+ssh://git@gitlab.corp.qunar.com:mfe/ykit-config-' + answers.type + '.git';
5861

59-
log('installing ' + packageName + '...');
6062
if(!fileExists('./' + configFileName)) {
6163
fs.createReadStream(sysPath.resolve(initTmplPath, 'ykit.common.js'))
6264
.pipe(replaceStream('#_name', answers.name))
6365
.pipe(fs.createWriteStream(sysPath.resolve(cwd, configFileName)));
6466
}
6567

66-
exec('npm i --save ' + 'ykit-config-' + answers.type, {silent:false}, (code, stdout, stderr) => {
68+
exec(installCmd, {silent:false}, (code, stdout, stderr) => {
6769
if(stderr) {
6870
log(stderr);
6971
}
7072

7173
if(code === 0){
72-
log('初始化成功')
74+
log('初始化成功');
7375
}
7476
})
7577
}

src/commands/lint.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ exports.run = function (options) {
1717
(callback) => project.lintCss(callback)
1818
], (err, results) => {
1919
if (!err) {
20-
console.log(results);
2120
if (results[0] && results[1]) {
2221
success('All Files Complete!');
2322
}

0 commit comments

Comments
 (0)