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.
@@ -1,4 +1,5 @@
1
1
  var path = require('path');
2
+ var fs = require('fs');
2
3
  var devMode = process.env.NODE_ENV !== 'production';
3
4
  var MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
5
  var { merge } = require('webpack-merge');
@@ -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
  // 捕获错误等信息并显示
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qmzreact",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "前端react本地启动服务和打包工具",
5
5
  "author": {
6
6
  "name": "qmz",