[build] reduce npm scripts

This commit is contained in:
陈嘉涵 2019-05-05 16:00:37 +08:00
parent 9fc2bed48e
commit e83abd30fe
2 changed files with 9 additions and 12 deletions

View File

@ -6,13 +6,14 @@ const signale = require('signale');
const { Signale } = signale;
const tasks = [
'bootstrap',
'lint',
'build:entry',
'build:components',
'build:style',
'build:style-entry',
'build:vant'
'npm run bootstrap',
'npm run lint',
'npm run build:entry',
'node build/build-components.js --color',
'node build/build-style.js',
'node build/build-style-entry.js',
'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'
];
tasks.forEach(task => {
@ -20,6 +21,6 @@ tasks.forEach(task => {
const interactive = new Signale({ interactive: true });
interactive.pending(task);
shell.exec(`npm run ${task} --silent`);
shell.exec(`${task} --silent`);
interactive.success(task);
});

View File

@ -18,10 +18,6 @@
"dev": "npm run build:entry && webpack-dev-server --config build/webpack.dev.js",
"lint": "eslint ./packages --ext .js,.vue,.ts,.tsx && stylelint \"packages/*.less\"",
"build:entry": "node build/build-entry.js",
"build:components": "node build/build-components.js --color",
"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": "node build/build-style.js",
"build:style-entry": "node build/build-style-entry.js",
"build:changelog": "vant-doc changelog ./changelog.generated.md",
"build:lib": "node build/build-lib.js",
"build:site": "rm -rf docs/dist && cross-env NODE_ENV=production webpack --config build/webpack.doc.js && gh-pages -d docs/dist",