Skip to content

Commit 34f1d03

Browse files
committed
tune build process
1 parent aa3219f commit 34f1d03

File tree

6 files changed

+17
-574
lines changed

6 files changed

+17
-574
lines changed

Makefile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
DENO_DEV = NODE_ENV=development deno run --watch
44
DENO_PROD = NODE_ENV=production deno run
55
DENO_OPTIONS = --allow-env --allow-read --allow-run
6-
ZIP_CHROME_FILE="extension.chrome.zip"
7-
BUNDLE = ./deno-bundle.ts
6+
CHROME_ZIP="extension.chrome.zip"
7+
OUTPUT_DIR = ./public/
8+
BUILD_DIR = ./public/build/
9+
BUILD_SCRIPT = ./build.ts
810

911
clean:
10-
rm -rf ./node_modules ./pnpm-lock.yaml ./public/build $(ZIP_CHROME_FILE)
12+
rm -rf ./node_modules $(BUILD_DIR) $(CHROME_ZIP)
1113

1214
install:
1315
deno install --allow-scripts
14-
npm i -g pnpm
15-
pnpm i
16-
pnpm rebuild sass
16+
npm i -g pnpm # for svelte-check
1717

1818
dev:
19-
rm -rf ./public/build
20-
$(DENO_DEV) $(DENO_OPTIONS) $(BUNDLE)
19+
rm -rf $(BUILD_DIR)
20+
$(DENO_DEV) $(DENO_OPTIONS) $(BUILD_SCRIPT)
2121

2222
valid:
2323
deno fmt --unstable-component
@@ -28,7 +28,7 @@ test: valid
2828
deno test --no-check --trace-leaks --reporter=dot
2929

3030
prod: test
31-
rm -rf ./public/build $(ZIP_CHROME_FILE)
32-
$(DENO_PROD) $(DENO_OPTIONS) $(BUNDLE)
33-
zip -r $(ZIP_CHROME_FILE) ./public ./manifest.json > /dev/null
34-
ls -l public/build/; ls -l extension.chrome.zip
31+
rm -rf $(BUILD_DIR) $(CHROME_ZIP)
32+
$(DENO_PROD) $(DENO_OPTIONS) $(BUILD_SCRIPT)
33+
zip -r $(CHROME_ZIP) $(OUTPUT_DIR) ./manifest.json > /dev/null
34+
tree -Dis $(BUILD_DIR) *.zip
File renamed without changes.

deno.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"lint": {
88
"include": [
9-
"deno-bundle.ts",
9+
"build.ts",
1010
"src/",
1111
"tests/",
1212
"public/*.html",
@@ -27,10 +27,8 @@
2727
"include": [
2828
"src/",
2929
"tests/",
30-
"deno-bundle.ts",
31-
"deno.json",
32-
"manifest.json",
33-
"tsconfig.json"
30+
"build.ts",
31+
"*.json"
3432
]
3533
},
3634
"imports": {

deno.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)