[build] reduce npm scripts
This commit is contained in:
+9
-8
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user