mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 11:17:41 +00:00
[Improvement] eslint before build (#455)
This commit is contained in:
@@ -1,37 +1,43 @@
|
||||
/**
|
||||
* Build npm lib
|
||||
* Steps:
|
||||
* 1. 构建 JS 入口文件
|
||||
* 2. 构建每个组件对应的 [component].js
|
||||
* 3. 构建 vant-css
|
||||
* 4. 打包 JS 文件:vant.js && vant.min.js
|
||||
* 5. 生成每个组件目录下的 style 入口
|
||||
* 1. 代码格式校验
|
||||
* 2. 构建 JS 入口文件
|
||||
* 3. 构建每个组件对应的 [component].js
|
||||
* 4. 构建 vant-css
|
||||
* 5. 打包 JS 文件:vant.js && vant.min.js
|
||||
* 6. 生成每个组件目录下的 style 入口
|
||||
*/
|
||||
|
||||
const chalk = require('chalk');
|
||||
require('shelljs/global');
|
||||
|
||||
// 1. build entry
|
||||
// 1. lint
|
||||
log('Starting', 'lint');
|
||||
exec('npm run lint --silent');
|
||||
log('Finished', 'lint');
|
||||
|
||||
// 2. build entry
|
||||
log('Starting', 'build:entry');
|
||||
exec('npm run build:file --silent');
|
||||
log('Finished', 'build:entry');
|
||||
|
||||
// 2. build [component].js
|
||||
// 3. build [component].js
|
||||
log('Starting', 'build:component');
|
||||
exec('npm run build:components --silent');
|
||||
log('Finished', 'build:component');
|
||||
|
||||
// 3. build vant-css
|
||||
// 4. build vant-css
|
||||
log('Starting', 'build:vant-css');
|
||||
exec('npm run build:vant-css --silent');
|
||||
log('Finished', 'build:vant-css');
|
||||
|
||||
// 4. build vant.js
|
||||
// 5. build vant.js
|
||||
log('Starting', 'build:vant');
|
||||
exec('npm run build:vant --silent');
|
||||
log('Finished', 'build:vant');
|
||||
|
||||
// 5. build style entrys
|
||||
// 6. build style entrys
|
||||
log('Starting', 'build:style-entries');
|
||||
exec('npm run build:style-entry --silent');
|
||||
log('Finished', 'build:style-entries');
|
||||
|
Reference in New Issue
Block a user