-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
69 additions
and
288 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { barelyServe } from "barely-a-dev-server"; | ||
|
||
export const barelyServeCommonOptions: Parameters<typeof barelyServe>[0] = { | ||
entryRoot: "src/timer.cubing.net", | ||
bundleCSS: true, | ||
esbuildOptions: { | ||
loader: { | ||
".ttf": "copy", | ||
".woff": "copy", | ||
".woff2": "copy", | ||
}, | ||
banner: { | ||
js: "globalThis.global = globalThis; // Workaround for a `pouch-db` dep. 😕\n", | ||
}, | ||
}, | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,26 @@ | ||
import { barelyServe } from "barely-a-dev-server"; | ||
import { build } from "esbuild"; | ||
import { injectManifest } from "workbox-build"; | ||
import { barelyServeCommonOptions } from "./barelyServeCommonOptions"; | ||
|
||
barelyServe({ | ||
...barelyServeCommonOptions, | ||
dev: false, | ||
entryRoot: "src/timer.cubing.net", | ||
outDir: "dist/timer.cubing.net", | ||
esbuildOptions: { | ||
external: ["crypto"], | ||
loader: { ".svg": "copy", ".ico": "copy" }, | ||
banner: { | ||
js: "globalThis.global = globalThis; // Workaround for a `pouch-db` dep. 😕\n", | ||
}, | ||
sourcemap: true, | ||
}, | ||
outDir: "dist/web/timer.cubing.net", | ||
}); | ||
|
||
await build({ | ||
entryPoints: ["src/service-worker/sw.ts"], | ||
bundle: true, | ||
format: "cjs", // 😕 Can't use module worker in Firefox yet. | ||
outfile: "dist/timer.cubing.net/sw.js", | ||
format: "esm", // TODO: test in Firefox | ||
outfile: "dist/web/timer.cubing.net/sw.js", | ||
}); | ||
|
||
await new Promise((resolve) => setTimeout(resolve, 1000)); | ||
|
||
await injectManifest({ | ||
globDirectory: "dist/timer.cubing.net/", | ||
globPatterns: ["**/*.{js,ico,html,png,css,ttf,txt,svg}"], | ||
swDest: "dist/timer.cubing.net/sw.js", | ||
swSrc: "dist/timer.cubing.net/sw.js", | ||
globDirectory: "dist/web/timer.cubing.net/", | ||
globPatterns: ["**/*.{js,ico,html,png,css,ttf,woff,woff2,txt,svg}"], | ||
swDest: "dist/web/timer.cubing.net/sw.js", | ||
swSrc: "dist/web/timer.cubing.net/sw.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,8 @@ | ||
import { barelyServe } from "barely-a-dev-server"; | ||
import { barelyServeCommonOptions } from "./barelyServeCommonOptions"; | ||
|
||
barelyServe({ | ||
entryRoot: "src/timer.cubing.net", | ||
...barelyServeCommonOptions, | ||
devDomain: "timer.localhost", | ||
port: 3334, | ||
esbuildOptions: { | ||
external: ["crypto"], | ||
loader: { ".svg": "copy", ".ico": "copy" }, | ||
banner: { | ||
js: "globalThis.global = globalThis; // Workaround for a `pouch-db` dep. 😕\n", | ||
}, | ||
sourcemap: true, | ||
}, | ||
}); |
83 changes: 0 additions & 83 deletions
83
src/timer.cubing.net/resources/vendor/cubing-icons/cubing-icons.css
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-6.14 KB
src/timer.cubing.net/resources/vendor/cubing-icons/fonts/cubing-icons.eot
Binary file not shown.
42 changes: 0 additions & 42 deletions
42
src/timer.cubing.net/resources/vendor/cubing-icons/fonts/cubing-icons.svg
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-5.96 KB
src/timer.cubing.net/resources/vendor/cubing-icons/fonts/cubing-icons.ttf
Binary file not shown.
Binary file removed
BIN
-6.03 KB
src/timer.cubing.net/resources/vendor/cubing-icons/fonts/cubing-icons.woff
Binary file not shown.
96 changes: 0 additions & 96 deletions
96
src/timer.cubing.net/resources/vendor/fonts/ubuntu/UFL.txt
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-292 KB
src/timer.cubing.net/resources/vendor/fonts/ubuntu/Ubuntu-Regular.ttf
Binary file not shown.
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
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