forked from onflow/fcl-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (41 loc) · 965 Bytes
/
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
PACKAGES := ls -d1 packages/*
RUN := xargs -n1 -t
EXEC := $(PACKAGES) | $(RUN)
.PHONY: default
default:
$(info Available Make Commands)
@awk -F: '/^[A-z\-_]+\:/ {print " - make " $$1}' Makefile | sort
.PHONY: all
all: clean install build test
$(info TSK all)
.PHONY: doctor
doctor: clean install build test
$(info TSK: doctor)
.PHONY: clean
clean:
$(info TSK clean)
$(info delete packages/*/node_modules)
$(EXEC) sh -c 'rm -rf $$0/node_modules'
$(info delete packages/*/dist)
$(EXEC) sh -c 'rm -rf $$0/dist'
.PHONY: install
install:
$(info TSK: install)
sh -c 'npm ci || exit 255'
.PHONY: build
build:
$(info TSK: build)
sh -c 'npm run build || exit 255'
.PHONY: test
test:
$(info TSK: test)
sh -c 'npm run test || exit 255'
.PHONY: publish
publish:
$(info TSK: publish)
$(info run "npm publish" in packages/*)
$(EXEC) sh -c 'npm publish $$0'
.PHONY: ci
ci: clean install build
$(info TSK: ci)
sh -c 'npm run test -- --ci || exit 255'