forked from marmelab/ng-admin-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (36 loc) · 1.79 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
.PHONY: build
install:
@npm install
@./node_modules/protractor/bin/webdriver-manager update
mkdir -p examples/blog/build/
mv node_modules/react-medium-editor node_modules/react-medium-editor_es6
./node_modules/babel/bin/babel/index.js node_modules/react-medium-editor_es6 --out-dir node_modules/react-medium-editor --stage 1 --compact false > /dev/null
mv node_modules/admin-config node_modules/admin-config_es6
./node_modules/babel/bin/babel/index.js node_modules/admin-config_es6 --out-dir node_modules/admin-config --stage 1 --compact false > /dev/null
rm -rf node_modules/react-medium-editor_es6
rm -rf node_modules/admin-config_es6
build:
@NODE_ENV=production ./node_modules/webpack/bin/webpack.js --optimize-minimize --optimize-occurence-order --optimize-dedupe --progress
@cp -Rf build/* examples/blog/build/
@echo "Files build/react-admin.min.css and build/react-admin.min.js updated (with minification)"
install-blog:
cd ./examples/blog && bower install && cd ../..
cp ./node_modules/babel-core/browser.min.js ./examples/blog/build/babel.min.js
run-blog:
@./node_modules/webpack-dev-server/bin/webpack-dev-server.js --progress --colors --hot --content-base examples/blog
start-test-server: test-server.PID
test-server.PID:
cd ./examples/blog && { python -m SimpleHTTPServer 8081 & echo $$! > ../../$@; } && cd ../..
stop-test-server: test-server.PID
@kill `cat $<` && rm $<
run-test-e2e: start-test-server test-e2e stop-test-server
test-unit-init:
./node_modules/babel/bin/babel/index.js app --out-dir src --stage 1 --compact false > /dev/null
test-unit-clean:
rm -rf ./src
test-unit-run:
@./node_modules/jest-cli/bin/jest.js src
test-unit: test-unit-init test-unit-run test-unit-clean
test-e2e:
@./node_modules/protractor/bin/protractor protractor.conf.js
test: test-unit build run-test-e2e