Browse Source

use imba build instead of imbac to build service worker as module so I can import version from package.json to sw.imba

main
familyfriendlymikey 2 years ago
parent
commit
0e757aa4bf
  1. 6
      package.json
  2. 4
      sw.imba

6
package.json

@ -1,13 +1,13 @@
{
"name": "fuzzyhome",
"version": "0.1.1",
"version": "0.1.2",
"scripts": {
"start": "imba run -SMH --baseurl . -w server.imba",
"build-app": "rm -rf dist && imba build -SMH --baseurl . server.imba",
"build-sw": "imbac sw.imba -o dist/public",
"build-sw": "imba build -SMH sw.imba -o dist/public",
"build": "npm run build-app && npm run build-sw",
"pages": "npx gh-pages --no-history --dotfiles --dist dist/public --branch deploy",
"static": "cd dist/public && echo http://localhost:8000 && python3 -m http.server &>/dev/null",
"static": "npm run build && cd dist/public && echo http://localhost:8000 && python3 -m http.server &>/dev/null",
"deploy": "npm run build && npm run pages"
},
"dependencies": {

4
sw.imba

@ -1,8 +1,10 @@
let p = console.log
import { version } from './package.json'
const app_prefix = "fuzzyhome_cache"
const version = "0.1.1"
const cache_name = "{app_prefix}-{version}"
p "service worker for fuzzyhome version {version}"
let urls = [
'./',
'./__assets__/all.css'

Loading…
Cancel
Save