-
Notifications
You must be signed in to change notification settings - Fork 10
/
makefile
49 lines (39 loc) · 1.17 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
.PHONY: build help
help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
install: package.json ## Install dependencies
@yarn
clean: ## Clean up the lib folder for building
@rm -rf lib
build: clean ## Compile ES6 files to JS
@NODE_ENV=production ./node_modules/.bin/babel \
--out-dir=lib \
--stage=0 \
--ignore=*.spec.js \
./src
watch: ## Continuously compile ES6 files to JS
@NODE_ENV=production ./node_modules/.bin/babel \
--out-dir=lib \
--stage=0 \
--ignore=*.spec.js \
--watch \
./src
test: ## Launch unit tests
@NODE_ENV=test ./node_modules/.bin/nyc \
./node_modules/.bin/mocha \
--opts ./mocha.opts \
"./src/**/*.spec.js"
inspect-test: ## Launch unit tests
@NODE_ENV=test ./node_modules/.bin/nyc \
./node_modules/.bin/mocha \
--opts ./mocha.opts \
--inspect-brk \
"./src/**/*.spec.js"
watch-test: ## Launch unit tests and watch for changes
@NODE_ENV=test ./node_modules/.bin/nyc \
./node_modules/.bin/mocha \
--opts ./mocha.opts \
--watch \
"./src/**/*.spec.js"
format: ## Format the source code
@./node_modules/.bin/eslint --fix ./src