[Build] beautify logger

This commit is contained in:
陈嘉涵 2018-06-15 18:59:14 +08:00
parent c7ffd6e6a0
commit d0674a1d8e
2 changed files with 11 additions and 6 deletions

View File

@ -3,17 +3,22 @@
*/
const shell = require('shelljs');
const signale = require('signale');
const { Signale } = signale;
const tasks = [
'bootstrap',
'lint',
'build:entry',
'build:components',
'build:vant-css',
'build:vant',
'build:style-entry'
'build:style-entry',
'build:vant'
];
tasks.forEach(task => {
signale.pending(task);
signale.start(task);
const interactive = new Signale({ interactive: true });
interactive.pending(task);
shell.exec(`npm run ${task} --silent`);
signale.success(task);
interactive.success(task);
});

View File

@ -18,12 +18,12 @@
"lint": "eslint ./packages --ext .js,.vue && stylelint \"packages/vant-css/src/*.css\"",
"build:file": "node build/build-entry.js",
"build:components": "node build/build-components.js --color",
"build:vant-css": "gulp build --gulpfile packages/vant-css/gulpfile.js --color",
"build:vant-css": "gulp build --gulpfile packages/vant-css/gulpfile.js --color --silent",
"build:vant": "cross-env NODE_ENV=production webpack --color --config build/webpack.build.js && cross-env NODE_ENV=production webpack -p --color --config build/webpack.build.js",
"build:style-entry": "node build/build-style-entry.js",
"build:changelog": "sh build/build-changelog.sh",
"build:iconfont": "gulp --gulpfile ./build/build-iconfont.js",
"build:lib": "npm run bootstrap && node build/build-lib.js",
"build:lib": "node build/build-lib.js",
"build:site": "rimraf docs/dist && cross-env NODE_ENV=production webpack --config build/webpack.doc.js && gh-pages -d docs/dist",
"test": "jest",
"test:watch": "jest --watch",