ucf-scripts-test
Version:
development and build services of UCF project
45 lines (42 loc) β’ 1.23 kB
JavaScript
/* UCF Build Services
* @Author: Kvkens(yueming@yonyou.com)
* @Date: 2019-01-22 09:43:39
* @Last Modified by: Kvkens
* @Last Modified time: 2019-01-22 09:43:42
*/
const chalk = require('chalk');
const webpack = require('webpack');
const util = require('./util');
const webpackConfig = require('./build.config');
const compiler = webpack(webpackConfig);
/**
* build δΈ»η¨εΊ
*/
build = () => {
console.log();
console.log(chalk.green(`--------------------------------------------`));
console.log(chalk.yellow(`\t π UCF Build Server`));
console.log(chalk.green(`\t [Build Version] : π
${util.getPkg().version}`));
console.log();
console.log(chalk.green(`\t πͺ Good Luck Please Wait βοΈ`));
console.log(chalk.green(`--------------------------------------------`));
console.log();
compiler.run((err, stats) => {
if (!err) {
console.log('\n' + stats.toString({
hash: false,
chunks: false,
children: false,
colors: true
}));
} else {
console.log(chalk.red(err));
}
});
}
//ε―ε¨ζε»Ί
module.exports = {
plugin: () => {
build();
}
}