我有一个gulp rjs任务,它将我的所有自定义.JS文件(所有非供应商库)串联并丑化。我想做的是从此任务中排除一些文件/目录(控制器和指令)。这是我的树: - application - resources - js main.js - vendor - jquery - modernzr - angular - controllers - controller1 - controller2 - controller3 - directives - directives1 - directives2 - directives3 - widgets - widget1 - widget2 - widget3 - widget4 - modules - modules1 - modules2 - modules3 - modules4这是我的gulp.jsdir = { app: 'application', dest: 'dest',};config = { src: { js: dir.app + '/resources/js' }, dest: { js: dir.dest + '/resources/js' }};gulp.task('rjs', function() { rjs({ baseUrl: config.src.js, out: 'main.js', name: 'main', mainConfigFile: config.src.js + '/main.js', exclude: [ 'jquery', 'angular'] }) .pipe(prod ? uglify({ mangle: false, outSourceMap: true, compress: { drop_console: true } }) : gutil.noop()) .pipe(gulp.dest(config.dest.js)) .pipe(filesize()) .pipe(dev ? connect.reload() : gutil.noop());});
添加回答
举报
0/150
提交
取消