qmzreact 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/conf/config/loaders.js +1 -0
- package/conf/webpack-server.js +5 -4
- package/package.json +1 -1
package/conf/config/loaders.js
CHANGED
package/conf/webpack-server.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
var { spawn, exec, execSync } = require('child_process');
|
|
2
2
|
var ora = require('ora');
|
|
3
3
|
var path = require('path');
|
|
4
|
+
var chalk = require('chalk');
|
|
4
5
|
var { utils, processConfig } = require('./options');
|
|
5
6
|
var childProcess;
|
|
6
7
|
|
|
@@ -28,7 +29,7 @@ if (Array.isArray(processConfig.watch) && processConfig.watch.length > 0) {
|
|
|
28
29
|
* 启动服务
|
|
29
30
|
*/
|
|
30
31
|
module.exports = function startServer() {
|
|
31
|
-
var spinner = ora('Starting dev server...');
|
|
32
|
+
var spinner = ora('Starting dev server... \n');
|
|
32
33
|
spinner.start();
|
|
33
34
|
childProcess = spawn(
|
|
34
35
|
'node',
|
|
@@ -56,15 +57,15 @@ module.exports = function startServer() {
|
|
|
56
57
|
const m = str.match(/(\d{1,3})%/);
|
|
57
58
|
if (m) {
|
|
58
59
|
const pct = m[1];
|
|
59
|
-
spinner.text = `Building ${pct}
|
|
60
|
+
spinner.text = `Building ${chalk.green.bold(pct + '%')} `;
|
|
60
61
|
if (pct === '100' || str.includes('100%')) {
|
|
61
|
-
spinner.succeed('Build 100%');
|
|
62
|
+
spinner.succeed(chalk.green.bold('Build 100%'));
|
|
62
63
|
if (spinner.isSpinning) spinner.stop();
|
|
63
64
|
}
|
|
64
65
|
return;
|
|
65
66
|
}
|
|
66
67
|
if (str.includes('100%')) {
|
|
67
|
-
spinner.succeed('Build 100%');
|
|
68
|
+
spinner.succeed(chalk.green.bold('Build 100%'));
|
|
68
69
|
if (spinner.isSpinning) spinner.stop();
|
|
69
70
|
}
|
|
70
71
|
// 捕获错误等信息并显示
|