Skip to content

Instantly share code, notes, and snippets.

@stefanledin
Last active October 16, 2017 15:45
Show Gist options
  • Select an option

  • Save stefanledin/d9f4141db6b545f66576f2694c07f2fa to your computer and use it in GitHub Desktop.

Select an option

Save stefanledin/d9f4141db6b545f66576f2694c07f2fa to your computer and use it in GitHub Desktop.
elixir(function(mix) {
// My elixir code goes here
});
gulp.task('generate-service-worker', function(callback) {
var swPrecache = require('sw-precache');
var rootDir = 'public';
swPrecache.write(`${rootDir}/service-worker.js`, {
staticFileGlobs: [
rootDir + '/build/**/*.{js,css}',
rootDir + '/img/**/*.{jpg,png,svg}'
],
stripPrefix: rootDir
}, callback);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment