This repository has been archived by the owner on Mar 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
63 lines (52 loc) · 1.64 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
52
53
54
55
56
57
58
59
60
61
62
63
.PHONY: help
help:
@echo "--[ CONFIGURATION ]------------------------------------------"
@echo "You may configure the build with the following environment"
@echo "variables:"
@echo ""
@echo " MM_EXPERIMENTAL_PACKAGES ..... Include experimental packages"
@echo ""
@echo ""
@echo "--[ AVAILABLE TASKS ]----------------------------------------"
@echo ""
@echo " install .............. Installs all dependencies"
@echo " lint ................. Lints selected packages"
@echo " build ................ Builds selected packages"
@echo " test ................. Tests selected packages"
@echo " clean-test ........... Re-installs, re-builds, and runs tests"
@echo " clean ................ Removes build artifacts from selected packages"
@echo ""
# ----------------------------------------------------------------------
bin := $(shell npm bin)
babel := $(bin)/babel
eslint := $(bin)/eslint
mocha := $(bin)/mocha
# -- [ CONFIGURATION ] -------------------------------------------------
ifndef MM_PACKAGES
ifeq ($(MM_EXPERIMENTAL_PACKAGES),true)
export MM_PACKAGES = $(wildcard packages/* experimental/*)
else
export MM_PACKAGES = $(wildcard packages/*)
endif
endif
# -- [ TASKS ] ---------------------------------------------------------
.PHONY: lint
lint:
./Scripts/run.sh lint "$$MM_PACKAGES"
.PHONY: build
build:
./Scripts/run.sh build "$$MM_PACKAGES"
.PHONY: test
test:
$(MAKE) build
./Scripts/run.sh test "$$MM_PACKAGES"
.PHONY: clean-test
clean-test:
./Scripts/run.sh clean-test "$$MM_PACKAGES"
.PHONY: clean
clean:
./Scripts/run.sh clean "$$MM_PACKAGES"
.PHONY: install
install:
npm install
./Scripts/run.sh install "$$MM_PACKAGES"