Skip to content

Commit

Permalink
feat: compress dist
Browse files Browse the repository at this point in the history
  • Loading branch information
acgotaku committed Jul 3, 2022
1 parent f726ac3 commit 84a9e9e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
10 changes: 9 additions & 1 deletion gulpfile.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import plumber from 'gulp-plumber'

import terser from 'gulp-terser'

import zip from 'gulp-zip'

const sass = gulpSass(dartSass)

const paths = {
Expand Down Expand Up @@ -132,9 +134,15 @@ function watch () {
gulp.watch(paths.styles.src, styles)
}

export function compress () {
return gulp.src(paths.compress.src)
.pipe(zip('chrome.zip'))
.pipe(gulp.dest(paths.compress.dest))
}

const build = gulp.parallel(scripts, styles, images, copys, copyVendor)
const serve = gulp.series(clean, build, watch)
const publish = gulp.series(clean, build)
const publish = gulp.series(clean, build, compress)

exports.build = build
exports.serve = serve
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"gulp-rollup-each": "^4.0.1",
"gulp-sass": "^5.1.0",
"gulp-terser": "^2.0.1",
"gulp-zip": "^5.1.0",
"imagemin-mozjpeg": "^9.0.0",
"imagemin-pngquant": "^9.0.2",
"postcss": "^8.4.14",
Expand Down
25 changes: 25 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 84a9e9e

Please sign in to comment.