You've already forked pure-component
添加了编译流程;
This commit is contained in:
25
gulpfile.js
Normal file
25
gulpfile.js
Normal file
@@ -0,0 +1,25 @@
|
||||
const gulp = require('gulp')
|
||||
const chinese2unicode = require('gulp-chinese2unicode')
|
||||
const gulpTerser = require('gulp-terser')
|
||||
|
||||
// 构建
|
||||
gulp.task('minify', async () => {
|
||||
console.log('开始构建...')
|
||||
gulp
|
||||
.src('index.js')
|
||||
.pipe(
|
||||
gulpTerser({
|
||||
mangle: {
|
||||
properties: true,
|
||||
},
|
||||
format: {
|
||||
ascii_only: true,
|
||||
},
|
||||
})
|
||||
)
|
||||
.pipe(chinese2unicode())
|
||||
.on('data', function () {
|
||||
console.log('构建完成!')
|
||||
})
|
||||
.pipe(gulp.dest('./src/'))
|
||||
})
|
Reference in New Issue
Block a user