您好,登錄后才能下訂單哦!
gulpfile.js:
var gulp = require('gulp'),
minifycss = require('gulp-minify-css'),
uglify = require('gulp-uglify');
var assetRev = require('gulp-asset-rev');
gulp.task('rev',['revCss','revJs','revImg'],function() {
gulp.src("./*.html")
.pipe(assetRev())
.pipe(gulp.dest('./dest'));
});
gulp.task('revCss',function () {
return gulp.src('./css/*.css')
.pipe(minifycss())
.pipe(assetRev())
.pipe(gulp.dest('./dest/css/'))
});
gulp.task('revJs',function () {
return gulp.src('./js/*.js')
.pipe(uglify())
.pipe(assetRev())
.pipe(gulp.dest('./dest/js/'))
});
gulp.task('revImg',function () {
return gulp.src('./img/*')
//.pipe(assetRev())
.pipe(gulp.dest('./dest/img/'))
});
gulp.task('default',['rev']);
/**
*
* 只添加版本號不壓縮
*
*/
/*var gulp = require('gulp');
var assetRev = require('gulp-asset-rev');
gulp.task('rev',['revCss','revJs','revImg'],function() {
gulp.src("./*.html")
.pipe(assetRev())
.pipe(gulp.dest('./dest'));
});
gulp.task('revCss',function () {
return gulp.src('./css/*.css')
.pipe(assetRev())
.pipe(gulp.dest('./dest/css/'))
});
gulp.task('revJs',function () {
return gulp.src('./js/*.js')
.pipe(assetRev())
.pipe(gulp.dest('./dest/js/'))
});
gulp.task('revImg',function () {
return gulp.src('./img/*')
//.pipe(assetRev())
.pipe(gulp.dest('./dest/img/'))
});
gulp.task('default',['rev']);*/
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。