A collection of service worker generation tools. Configurable and forkable.
A node module for generating service worker files based on provided configuration options.
A webpack plugin for generating dynamic service worker files and a runtime helper.
A mock service worker environment generator. Used for testing service worker code.
We encourage forking of the base templates found in packages/generate-service-worker/templates/.
|install all dev dependencies|
|run the test suite|
|run the demo for development testing|
To get started contributing, run
yarn start, which will run a webpack-devserver on
demo/webpack.config.js you'll see the configurations used for the demo testing. Each experimental config can be accessed via the
key query param (i.e.
localhost:3000?key=withNotifications). This provides a simple way to install a new service worker for testing, and the corresponding generated code will be visible in the DOM itself thanks to highlight.js. Use the
application tab in the devtools to verify that the service worker was installed. By setting
debug: true in the plugin config, the devtools console can be used to verify actions are taking place.
Some ideas for contributions: