-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
49 lines (49 loc) · 1.82 KB
/
package.json
File metadata and controls
49 lines (49 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
"$schema": "https://json.schemastore.org/package.json",
"name": "def-html5-opt",
"version": "2.0.0",
"description": "Generates a service worker for web games exported from Defold",
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/thinknathan/def-html5-opt.git"
},
"author": "Nathan Bolton (https://thinknathan.ca/)",
"license": "CC0-1.0",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"scripts": {
"add-sw-tag": "node ./tools/add-sw-tag.mjs",
"ci": "tsc ./src/load-sw.ts --noEmit && npm run lint:ts && npm run lint:js",
"build": "npm run preload && npm run minify && npm run sw",
"build-load-sw": "esbuild ./src/load-sw.ts --bundle --minify --outdir=copy-game-here",
"build-sw": "npx workbox-cli generateSW workbox-config.js",
"lint": "npm run lint:ts && npm run lint:js",
"lint:ts": "eslint ./src",
"lint:js": "eslint ./tools/*.mjs",
"minify": "npm run minify-js && npm run minify-index",
"minify-js": "node ./tools/minify-js.mjs",
"minify-index": "html-minifier-terser ./copy-game-here/index.html --collapse-whitespace --remove-comments --remove-script-type-attributes --remove-style-link-type-attributes --minify-js true --minify-css true --output ./copy-game-here/index.html",
"preload": "node ./tools/add-preload-tags.mjs",
"prettier": "prettier --write ./**/*.{cjs,ts,mjs,md,d.ts}",
"sw": "npm run build-load-sw && npm run add-sw-tag && npm run build-sw"
},
"devDependencies": {
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"esbuild": "~0.24.0",
"eslint": "^9.0.0",
"globals": "*",
"html-minifier-terser": "^7.2.0",
"husky": "^9.0.11",
"prettier": "^3.1.1",
"terser": "^5.26.0",
"typescript": "~5.7.0",
"typescript-eslint": "^8.0.0",
"workbox-cli": "^7.0.0"
},
"dependencies": {
"workbox-window": "^7.0.0"
}
}