https://docs.docker.com/engine/install/debian/
Add the docker group if it doesn't already exist:
https://docs.docker.com/engine/install/debian/
Add the docker group if it doesn't already exist:
| #!/bin/bash | |
| rm -rf ./dist && | |
| parcel build src/index.html && | |
| VERSION=$(git rev-parse --short HEAD) | |
| cp ./dist/src*.js ./dist/$VERSION.js | |
| cp ./dist/src*.js ./dist/default.js |
| // https://mydevhack.com/post/automatically-generate-a-new-service-worker-version | |
| const fs = require('fs') | |
| // Create new version | |
| const version = new Date().getTime() | |
| // Write new version to service worker | |
| fs.readFile('sw.js', 'utf8', function (err,data) { | |
| if (err) { | |
| return console.log(err) |
| // Service Worker | |
| var CACHE_NAME = 'v-1' | |
| // Initial Assets to Cache | |
| var urlsToCache = [ | |
| '/', | |
| '/index.html', | |
| '/android-chrome-144x144.png', | |
| '/android-chrome-192x192.png', |
| // Service Worker | |
| (function(serviceWorker) { | |
| if ('serviceWorker' in navigator) { | |
| window.addEventListener('load', function() { | |
| navigator.serviceWorker.register('/sw.js').then(function(registration) { | |
| console.log('ServiceWorker registration successful with scope: ', registration.scope) | |
| }, function(err) { | |
| console.log('ServiceWorker registration failed: ', err) | |
| }) | |
| }) |
| { | |
| "compilerOptions": { | |
| "target": "es5", | |
| "module": "esnext", | |
| "experimentalDecorators": true, | |
| "emitDecoratorMetadata": false, | |
| "moduleResolution": "node", | |
| "stripInternal": true, | |
| "declaration": false, | |
| "allowSyntheticDefaultImports": true, |
| { | |
| "name": "parcel-example", | |
| "version": "1.0.0", | |
| "description": "A basic setup using Parcel - A blazing fast, zero configuration web application bundler", | |
| "scripts": { | |
| "start": "NODE_ENV=development parcel src/index.html --open", | |
| "build": "NODE_ENV=production rm -rf dist && tsc --noEmit && parcel build src/index.html", | |
| "clean": "rm -rf dist" | |
| }, | |
| "private": true, |
| const { watch, src, dest, parallel } = require('gulp'); | |
| const sass = require('gulp-sass'); | |
| const cssnano = require('cssnano'); | |
| const sourcemaps = require('gulp-sourcemaps'); | |
| const postcss = require('gulp-postcss'); | |
| const autoprefixer = require('autoprefixer'); | |
| const concat = require('gulp-concat'); | |
| const browserSync = require('browser-sync'); | |
| const newer = require('gulp-newer'); | |
| const imagemin = require('gulp-imagemin'); |
| // in dev tools, right click on object and `store as global variable` | |
| JSON.stringify(temp1, null, 2) // 2 tab spacing |
| import { useEffect, useState } from "react" | |
| import { createBrowserHistory } from "history" | |
| const history = createBrowserHistory() | |
| const trim = url => url.replace(/^\/|\/$/g, "") | |
| function useRouter(initial = "") { | |
| const [route, setRoute] = useState(initial) | |
| useEffect(() => { | |
| const { pathname, search } = new URL(route, window.location.href) |