Skip to content

Instantly share code, notes, and snippets.

View camille-hdl's full-sized avatar

Camille Hodoul camille-hdl

View GitHub Profile
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:
{
"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"
}
}
{
"baseUrl": "http://127.0.0.1:5000",
"video": false,
}
{
"jest": {
"verbose": true,
"testRegex": "(/__tests__/.*|\\.(test|spec|react-test))\\.(js|jsx)$",
"moduleFileExtensions": [
"js"
],
"globals": {
"NODE_ENV": "test"
},
<!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>
{
"public": "public",
"rewrites": [{ "source": "/**", "destination": "/index.html" }],
"headers": [
{
"source": "**/sw.js",
"headers": [
{
"key": "Cache-Control",
"value": "no-cache"
{
"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"
}
}
module.exports = {
"globDirectory": "public",
"globPatterns": [
"**/*.html",
"js/system/*.js",
],
"swDest": "public/js/system/sw.js",
"swSrc": "./src/sw.js",
"modifyUrlPrefix": {
"js/": "/js/",
module.exports = {
"globDirectory": "public",
"globPatterns": [
"**/*.html",
"js/esm/*.js",
],
"swDest": "public/js/esm/sw.js",
"swSrc": "./src/sw.js",
"modifyUrlPrefix": {
"js/": "/js/",
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({