Last active
October 16, 2017 15:45
-
-
Save stefanledin/d9f4141db6b545f66576f2694c07f2fa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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