Skip to content

Commit 63b0b3c

Browse files
committed
feat: 添加 config file 没有找到的警告
1 parent 4fa1e43 commit 63b0b3c

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

lib/commands/pack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ exports.run = function (options) {
5353
}
5454

5555
if ((0, _keys2.default)(config.entry).length === 0) {
56-
logWarn('Local config exports aseets not found.');
56+
logError('No assets entry found.');
5757
logDoc('http://ued.qunar.com/ykit/docs-%E9%85%8D%E7%BD%AE.html');
5858
process.exit(1);
5959
}

lib/models/Config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ var Config = function () {
3838
fs.mkdirSync(modulePath);
3939
fs.mkdirSync(sysPath.join(cwd, YKIT_CACHE_DIR));
4040
}
41+
} else {
42+
logWarn('No ykit config file found.');
4143
}
4244

4345
this._config = {

src/commands/pack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ exports.run = function (options) {
5151
}
5252

5353
if(Object.keys(config.entry).length === 0) {
54-
logWarn('Local config exports aseets not found.');
54+
logError('No assets entry found.');
5555
logDoc('http://ued.qunar.com/ykit/docs-%E9%85%8D%E7%BD%AE.html');
5656
process.exit(1);
5757
}

src/models/Config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class Config {
1717
fs.mkdirSync(modulePath);
1818
fs.mkdirSync(sysPath.join(cwd, YKIT_CACHE_DIR));
1919
}
20+
} else {
21+
logWarn('No ykit config file found.');
2022
}
2123

2224
this._config = {

0 commit comments

Comments
 (0)