|
2 | 2 | "compilerOptions": { |
3 | 3 | "lib": ["dom", "deno.ns"] |
4 | 4 | }, |
| 5 | + "permissions": { |
| 6 | + "build-dictionary": { |
| 7 | + "env": ["NO_COLOR", "DEBUG_TAGS", "DEBUG_CHUNKS"], |
| 8 | + "read": ["./dictionary/dictionary"], |
| 9 | + "write": ["./dictionary/dictionary.ts"] |
| 10 | + }, |
| 11 | + "soft-build-dictionary": { |
| 12 | + "env": ["NO_COLOR", "DEBUG_TAGS", "DEBUG_CHUNKS"], |
| 13 | + "read": ["./dictionary/dictionary", "./dictionary/dictionary.ts"], |
| 14 | + "write": ["./dictionary/dictionary.ts"] |
| 15 | + } |
| 16 | + }, |
5 | 17 | "tasks": { |
6 | 18 | "build": { |
7 | 19 | "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`.", |
|
10 | 22 | }, |
11 | 23 | "start": { |
12 | 24 | "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)", |
| 25 | + "command": "(trap 'kill 0' SIGINT; deno run --permission-set=build-dictionary --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 | 26 | "dependencies": ["soft-build-dictionary"] |
15 | 27 | }, |
16 | 28 | "repl": { |
|
20 | 32 | }, |
21 | 33 | "build-dictionary": { |
22 | 34 | "description": "Builds the dictionary at `./dictionary/dictionary.ts`", |
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" |
| 35 | + "command": "deno run --permission-set=build-dictionary --no-prompt --frozen --cached-only ./dictionary/build.ts" |
24 | 36 | }, |
25 | 37 | "soft-build-dictionary": { |
26 | 38 | "description": "Only builds the dictionary at `./dictionary/dictionary.ts` when it doesn't 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" |
| 39 | + "command": "deno run --permission-set=soft-build-dictionary --no-prompt --frozen --cached-only ./dictionary/soft-build.ts" |
28 | 40 | } |
29 | 41 | }, |
30 | 42 | "fmt": { |
|
0 commit comments