Skip to content

Instantly share code, notes, and snippets.

@alexpermiakov
Created December 23, 2019 14:15
Show Gist options
  • Save alexpermiakov/00b94a32b1cdd20f2efe8f82f522580a to your computer and use it in GitHub Desktop.
Save alexpermiakov/00b94a32b1cdd20f2efe8f82f522580a to your computer and use it in GitHub Desktop.
const { src, dest, series } = require("gulp");
const minify = require("gulp-minify");
const template = require("gulp-template");
const copyServiceWorker = () =>
src("./src/sw.js")
.pipe(minify())
.pipe(dest("dist/"))
.pipe(template({ buildVersion: +new Date() }))
.pipe(dest("./dist"));
exports.default = series(
// ...
copyServiceWorker,
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment