generated from bowtie-co/template-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (35 loc) · 1.11 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
project_name = template-react
setup: init rebuild
start: up
stop: clean
restart: clean build up
rebuild: preup build
rebuild-clean: super-clean rebuild
init:
([ ! -e .git/hooks/pre-push ] || rm .git/hooks/pre-push) && ln -s ../../bin/pre-push .git/hooks
clean:
docker-compose rm --force --stop -v
super-clean: clean
docker system prune --all --force --volumes
build: clean docker-build install
docker-build:
docker-compose build
docker-build-no-cache:
docker-compose build --pull --no-cache
install:
docker-compose run -l traefik.enable=false --rm $(project_name) npm install
preup:
btdev start
up: preup
docker-compose up --force-recreate
sh:
docker-compose run -l traefik.enable=false --rm $(project_name) sh
bash:
docker-compose run -l traefik.enable=false --rm $(project_name) bash
lint:
docker-compose run -l traefik.enable=false --rm $(project_name) npm run lint
test:
docker-compose run -l traefik.enable=false --rm -e NODE_ENV=test -e CI=true $(project_name) npm test
fix:
docker-compose run -l traefik.enable=false --rm $(project_name) npm run lint:fix
.PHONY: init clean build install lint test