forked from marmelab/react-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (38 loc) · 1.62 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
@npm install
run: example_install ## run the example
@cd example && ../node_modules/.bin/webpack-dev-server --hot --inline --config ./webpack.config.js
example_install: example/package.json
@cd example && npm install
build: ## compile ES6 files to JS
@NODE_ENV=production ./node_modules/.bin/babel ./src -d lib --ignore '*.spec.js'
watch: ## continuously compile ES6 files to JS
@NODE_ENV=production ./node_modules/.bin/babel ./src -d lib --ignore '*.spec.js' --watch
doc: ## compile doc as html and launch doc web server
@cd docs && jekyll server . --watch
test: test-unit test-e2e ## launch all tests
test-unit: ## launch unit tests
@NODE_ENV=test NODE_ICU_DATA=node_modules/full-icu ./node_modules/.bin/mocha \
--require ignore-styles \
--compilers js:babel-register \
'./src/**/*.spec.js'
test-unit-watch: ## launch unit tests and watch for changes
@NODE_ENV=test NODE_ICU_DATA=node_modules/full-icu ./node_modules/.bin/mocha \
--require ignore-styles \
--compilers js:babel-register \
--watch \
'./src/**/*.spec.js'
test-e2e: ## launch end-to-end tests
@if [ "$(build)" != "false" ]; then \
echo 'Building example code (call "make build=false test-e2e" to skip the build)...'; \
cd example && ../node_modules/.bin/webpack; \
fi
@echo 'Launching e2e tests...'
@NODE_ENV=test node_modules/.bin/mocha \
--compilers js:babel-register \
--timeout 15000 \
./e2e/tests/server.js \
./e2e/tests/*.js