-
Notifications
You must be signed in to change notification settings - Fork 0
/
deno.json
75 lines (75 loc) · 4.33 KB
/
deno.json
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
"nodeModulesDir": "auto",
"compilerOptions": {
"experimentalDecorators": true,
"strict": true,
"jsx": "react-jsx",
"jsxImportSource": "https://esm.sh/preact@10.24.3?pin=v67",
"lib": [
"dom",
"dom.iterable",
"deno.ns"
]
},
"fmt": {
"useTabs": false,
"lineWidth": 160,
"indentWidth": 4,
"singleQuote": false,
"proseWrap": "preserve"
},
"lint": {
"rules": {
"tags": [
"recommended"
],
"include": [
"default-param-last",
"eqeqeq",
"no-const-assign",
"no-eval",
"no-non-null-asserted-optional-chain",
"no-sparse-arrays",
"no-throw-literal",
"no-undef"
],
"exclude": []
}
},
"tasks": {
"build": "deno task clean && deno task ensure-out-exists && deno task copy:assets && deno task build:assets && deno task minify:assets && deno task compress && deno task build:server && deno task minify:server",
"build:assets": "deno task build:assets:js && deno task build:assets:css",
"build:assets:css": "sass --no-source-map -I assets/node_modules assets/index.scss out/assets/index.css",
"build:assets:css:watch": "sass --no-source-map -I assets/node_modules assets/index.scss out/assets/index.css --watch",
"build:assets:js": "deno task ensure-out-exists && deno task bundle assets/tsconfig.json assets/index.ts ./out/assets/index.js",
"build:assets:js:watch": "deno task ensure-out-exists && deno task bundle assets/tsconfig.json assets/index.ts out/assets/index.js",
"build:ingredient-parser": "deno run --allow-run --allow-read --allow-write=src/data/parse/ingredient/parser.js dev/build-ingredient-parser.ts",
"build:server": "deno task bundle deno.json src/main.ts out/server.js && deno run --allow-read --allow-write --allow-run dev/write-build-info.ts",
"build:icons": "deno run --allow-read --allow-write dev/build-icons.ts",
"build:icons:watch": "deno run --watch=src/tpl/templates/_components/icon.tsx --allow-read --allow-write dev/build-icons.ts",
"clean": "rm -rf out/",
"compress": "deno task compress:brotli && deno task compress:gzip",
"compress:brotli": "cd out/assets && brotli -f -k index.min.css index.min.js",
"compress:gzip": "cd out/assets && gzip -f -k index.min.css index.min.js",
"copy:assets": "cp -r assets/favicons/ assets/icons.svg assets/placeholder.svg assets/sw.js out/assets",
"coverage": "deno coverage --exclude=tests --lcov ./out/coverage --output=out/coverage.lcov",
"coverage:html": "genhtml -o out/coverage-html out/coverage.lcov",
"ensure-out-exists": "deno run --allow-read --allow-write dev/ensure-dir-exists.ts out/assets",
"fmt": "deno fmt ./dev ./src ./tests",
"fmt:check": "deno task fmt --check",
"insert-example-data": "deno run --allow-all dev/insert-example-data.ts",
"lint": "deno lint ./dev ./src ./tests",
"minify:assets": "deno task minify:assets:js && deno task minify:assets:css",
"minify:assets:css": "lightningcss --minify --nesting --bundle --targets '>= 0.25%' out/assets/index.css -o out/assets/index.min.css",
"minify:assets:js": "esbuild --legal-comments=none --bundle --format=esm --minify out/assets/index.js --outfile=out/assets/index.min.js",
"minify:server": "esbuild --legal-comments=none --bundle --format=esm --minify --platform=node out/server.js --outfile=out/server.min.js",
"run:debug": "deno run --watch=deno.lock,deno.json --check --allow-all --config=deno.json src/main.ts",
"run:dev": "deno task build:assets:css:watch & deno task build:assets:js:watch & deno task build:icons:watch & deno task run:debug",
"test": "deno test --allow-read --allow-net --allow-import --allow-env --allow-write --fail-fast --parallel .",
"test:coverage": "deno task test --coverage=out/coverage",
"test:check": "deno task test --check",
"test:watch": "deno task test --watch",
"update-lock-file": "deno cache --allow-import --lock deno.lock deps.ts deps-test.ts dev/bundle.ts",
"bundle": "deno run --allow-all dev/bundle.ts"
}
}