|
5 | 5 | "tasks": { |
6 | 6 | "build": { |
7 | 7 | "description": "Builds every static files needed for GitHub pages. This builds the dictionary first at `./dictionary/dictionary.ts` then the distribution code `./dist/main.js`.", |
8 | | - "command": "deno run -E -R -W -N=jsr.io --allow-run --no-prompt --frozen --cached-only ./build/build.ts" |
| 8 | + "command": "deno bundle --output=./dist/main.js --minify --sourcemap=linked --platform=browser --format=iife ./src/main.ts", |
| 9 | + "dependencies": ["build-dictionary"] |
9 | 10 | }, |
10 | 11 | "start": { |
11 | | - "description": "Starts a development server. The provided page will auto-reload whenever there are changes to the code.", |
12 | | - "command": "deno run -E -R -W -N=jsr.io --allow-run --no-prompt --frozen --cached-only ./build/dev.ts" |
| 12 | + "description": "Starts a development server which automatically rebuilds the project whenever there are changes to the code. However, there is no server that serves frontend and you have to manually refresh the page.", |
| 13 | + "command": "(trap 'kill 0' SIGINT; deno run -E=NO_COLOR,DEBUG_TAGS,DEBUG_CHUNKS -R=./dictionary/dictionary -W=./dictionary/dictionary.ts --no-prompt --frozen --cached-only --watch --no-clear-screen ./dictionary/watch.ts & deno bundle --output=./dist/main.js --sourcemap=linked --platform=browser --format=iife --watch ./src/main.ts)", |
| 14 | + "dependencies": ["soft-build-dictionary"] |
13 | 15 | }, |
14 | 16 | "repl": { |
15 | 17 | "description": "Starts a REPL", |
|
19 | 21 | "build-dictionary": { |
20 | 22 | "description": "Builds the dictionary at `./dictionary/dictionary.ts`", |
21 | 23 | "command": "deno run -E=NO_COLOR,DEBUG_TAGS,DEBUG_CHUNKS -R=./dictionary/dictionary -W=./dictionary/dictionary.ts --no-prompt --frozen --cached-only ./dictionary/build.ts" |
| 24 | + }, |
| 25 | + "soft-build-dictionary": { |
| 26 | + "description": "Only builds the dictionary at `./dictionary/dictionary.ts` when it exists. When an error occurs, an empty dictionary is provided.", |
| 27 | + "command": "deno run -E=NO_COLOR,DEBUG_TAGS,DEBUG_CHUNKS -R=./dictionary/dictionary,./dictionary/dictionary.ts -W=./dictionary/dictionary.ts --no-prompt --frozen --cached-only ./dictionary/soft-build.ts" |
22 | 28 | } |
23 | 29 | }, |
24 | 30 | "fmt": { |
|
53 | 59 | } |
54 | 60 | }, |
55 | 61 | "imports": { |
56 | | - "@luca/esbuild-deno-loader": "jsr:@luca/esbuild-deno-loader@^0.11.1", |
57 | 62 | "@std/assert": "jsr:@std/assert@^1.0.14", |
58 | 63 | "@std/async": "jsr:@std/async@^1.0.14", |
59 | 64 | "@std/cache": "jsr:@std/cache@^0.2.0", |
|
64 | 69 | "@std/regexp": "jsr:@std/regexp@^1.0.1", |
65 | 70 | "@std/text": "jsr:@std/text@^1.0.16", |
66 | 71 | "browser-dtector": "npm:browser-dtector@^4.1.0", |
67 | | - "compromise": "npm:compromise@^14.14.4", |
68 | | - "esbuild": "npm:esbuild@^0.25.9" |
| 72 | + "compromise": "npm:compromise@^14.14.4" |
69 | 73 | } |
70 | 74 | } |
0 commit comments