其实我有这个,但我想添加uncss插件。或者我如何可以动态添加引用。
var usemin = require('gulp-usemin');
var uglify = require('gulp-uglify');
var uncss = require('gulp-uncss');
var minifyHtml = require('gulp-minify-html');
var minifyCss = require('gulp-minify-css');
var rev = require('gulp-rev');
gulp.task('usemin', function () {
return gulp.src('./*.html')
.pipe(usemin({
css: [minifyCss(), 'concat'],
html: [minifyHtml({empty: true})],
js: [uglify(), rev()]
}))
.pipe(gulp.dest('build/'));
});