提交 f7b69255 编写于 作者: Y yangyiliang 提交者: quyatong

delte interface gulp

上级 5e95505a
const gulp = require('gulp');
const uglify = require('gulp-uglify-es')["default"];
const through = require('through2');
gulp.task('build', function () {
gulp.src('src/**/**.js')
.pipe(through.obj(function (file, encode, cb) {
var result = file.contents.toString()
result = result.replace(/@didi\/chameleon\-loader\/lib\//g, 'chameleon-loader/src/');
// // 再次转为Buffer对象,并赋值给文件内容
file.contents = new Buffer(result)
// 以下是例行公事
this.push(file)
cb()
}))
.pipe(uglify({
parse: {
bare_returns: true
},
mangle: {
toplevel: true
},
compress: {
drop_console: true,
drop_debugger: true
}
}))
.pipe(gulp.dest('dist/'));
});
......@@ -25,8 +25,6 @@
"chai": "^4.2.0",
"coveralls": "^2.11.9",
"eslint": "^5.9.0",
"gulp": "^3.9.1",
"gulp-uglify-es": "^1.0.4",
"istanbul": "^0.4.5",
"mocha": "^5.2.0",
"through2": "^3.0.0"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册