vant/build/build-lib.js
2019-07-03 12:58:39 +08:00

27 lines
695 B
JavaScript

/**
* Build npm lib
*/
const shell = require('shelljs');
const signale = require('signale');
const { Signale } = signale;
const tasks = [
'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.config.js',
'cross-env NODE_ENV=production webpack -p --color --config build/webpack.config.js'
];
tasks.forEach(task => {
signale.start(task);
const interactive = new Signale({ interactive: true });
interactive.pending(task);
shell.exec(`${task} --silent`);
interactive.success(task);
});