Skip to content

Commit afe8c0f

Browse files
committed
tune Makefile
1 parent 0b56e33 commit afe8c0f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
.PHONY: clean install dev valid test prod
22
.DEFAULT_GOAL := dev
3+
DENO_DEV = NODE_ENV=development deno run --watch
4+
DENO_PROD = NODE_ENV=production deno run
5+
DENO_OPTIONS = --allow-env --allow-read --allow-run
36
ZIP_CHROME_FILE="extension.chrome.zip"
47
BUNDLE = ./deno-bundle.ts
58

@@ -14,8 +17,7 @@ install:
1417

1518
dev:
1619
rm -rf ./public/build
17-
NODE_ENV=development \
18-
deno run --watch --allow-env --allow-read --allow-run $(BUNDLE)
20+
$(DENO_DEV) $(DENO_OPTIONS) $(BUNDLE)
1921

2022
valid:
2123
deno fmt --unstable-component
@@ -27,7 +29,6 @@ test: valid
2729

2830
prod: test
2931
rm -rf ./public/build $(ZIP_CHROME_FILE)
30-
NODE_ENV=production \
31-
deno run --allow-env --allow-read --allow-run $(BUNDLE)
32+
$(DENO_PROD) $(DENO_OPTIONS) $(BUNDLE)
3233
zip -r $(ZIP_CHROME_FILE) ./public ./manifest.json > /dev/null
3334
ls -l public/build/; ls -l extension.chrome.zip

0 commit comments

Comments
 (0)