forked from SensCritique/browser-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (35 loc) · 1.19 KB
/
Makefile
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
RUN_NODE = docker-compose run --rm -Ti node
.PHONY: build-firefox
build-firefox:
${RUN_NODE} npx webpack --mode=production --env=production --config=webpack_firefox.config.js
cd dist/firefox/main && zip -r ../latest_firefox.xpi * && mv ../latest_firefox.xpi ../../../releases/
.PHONY: watch-firefox
watch-firefox:
${RUN_NODE} npx webpack --mode=development --env=development --config=webpack_firefox.config.js --watch
.PHONY: build-chrome
build-chrome:
${RUN_NODE} npx webpack --mode=production --env=production --config=webpack_chrome.config.js
cd dist/chrome/main && zip -r ../latest_chrome.zip * && mv ../latest_chrome.zip ../../../releases/
.PHONY: watch-chrome
watch-chrome:
${RUN_NODE} npx webpack --mode=development --env=development --config=webpack_chrome.config.js --watch
.PHONY: fix
fix:
${RUN_NODE} npx eslint --fix src/*
.PHONY: build-all
build-all:
@echo "Did you edit the version on manifest*.json and package.json ? [y/n]" && read ans && [ $${ans:-N} = y ]
$(MAKE) build-firefox
$(MAKE) build-chrome
.PHONY: install
install:
${RUN_NODE} npm install
.PHONY: test
test:
${RUN_NODE} npm test ${FILE}
.PHONY: sh
sh:
${RUN_NODE} sh
.PHONY: lint
lint:
${RUN_NODE} npx eslint --fix src/ --ext .ts