This file contains 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
language: node_js | |
node_js: | |
- "node" | |
- "lts/*" | |
addons: | |
apt: | |
packages: | |
# Ubuntu 16+ does not install this dependency by default, so we need to install it ourselves | |
- libgconf-2-4 | |
cache: |
This file contains 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
{ | |
"scripts": { | |
"test": "run-s jest build testci", | |
"testci": "start-server-and-test serve http://localhost:5000 cypress:run", | |
"cypress:open": "cypress open", | |
"cypress:run": "cypress run", | |
"cypress:install": "cypress install", | |
"jest": "jest" | |
} | |
} |
This file contains 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
{ | |
"baseUrl": "http://127.0.0.1:5000", | |
"video": false, | |
} |
This file contains 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
{ | |
"jest": { | |
"verbose": true, | |
"testRegex": "(/__tests__/.*|\\.(test|spec|react-test))\\.(js|jsx)$", | |
"moduleFileExtensions": [ | |
"js" | |
], | |
"globals": { | |
"NODE_ENV": "test" | |
}, |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="x-ua-compatible" content="ie=edge" /> | |
<title>Rollup React example</title> | |
<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no" /> | |
</head> | |
<body> | |
<script> |
This file contains 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
{ | |
"public": "public", | |
"rewrites": [{ "source": "/**", "destination": "/index.html" }], | |
"headers": [ | |
{ | |
"source": "**/sw.js", | |
"headers": [ | |
{ | |
"key": "Cache-Control", | |
"value": "no-cache" |
This file contains 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
{ | |
"scripts": { | |
"build": "run-s buildrollup workbox", | |
"buildrollup": "rollup -c --prod --mini", | |
"workboxesm": "workbox injectManifest workbox-config-esm.js", | |
"workboxsystem": "workbox injectManifest workbox-config-system.js", | |
"workbox": "run-p workboxesm workboxsystem" | |
} | |
} |
This file contains 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
module.exports = { | |
"globDirectory": "public", | |
"globPatterns": [ | |
"**/*.html", | |
"js/system/*.js", | |
], | |
"swDest": "public/js/system/sw.js", | |
"swSrc": "./src/sw.js", | |
"modifyUrlPrefix": { | |
"js/": "/js/", |
This file contains 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
module.exports = { | |
"globDirectory": "public", | |
"globPatterns": [ | |
"**/*.html", | |
"js/esm/*.js", | |
], | |
"swDest": "public/js/esm/sw.js", | |
"swSrc": "./src/sw.js", | |
"modifyUrlPrefix": { | |
"js/": "/js/", |
This file contains 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
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js"); | |
workbox.precaching.suppressWarnings(); | |
// the following line will be replaced by workbox-cli | |
workbox.precaching.precacheAndRoute([]); | |
// Cache unpkg (for systemjs) | |
workbox.routing.registerRoute( | |
/^https:\/\/unpkg\.com/, | |
workbox.strategies.cacheFirst({ |
NewerOlder