cross: bump dependency versions

This commit is contained in:
Shuanglei Tao
2020-06-25 11:25:08 +08:00
parent f1119b288e
commit 4aeb4e1077
3 changed files with 21 additions and 14 deletions

View File

@@ -3,7 +3,7 @@ const clean = require('gulp-clean');
const gzip = require('gulp-gzip');
const inlineSource = require('gulp-inline-source');
const rename = require("gulp-rename");
const through = require('through2');
const through2 = require('through2');
const genHeader = (size, buf, len) => {
let idx = 0;
@@ -40,12 +40,12 @@ task('clean', () => {
task('default', () => {
return src('dist/index.html')
.pipe(inlineSource())
.pipe(through.obj((file, enc, cb) => {
.pipe(through2.obj((file, enc, cb) => {
fileSize = file.contents.length;
return cb(null, file);
}))
.pipe(gzip())
.pipe(through.obj((file, enc, cb) => {
.pipe(through2.obj((file, enc, cb) => {
const buf = file.contents;
file.contents = Buffer.from(genHeader(fileSize, buf, buf.length));
return cb(null, file);