1 | SHELL := /bin/bash
|
2 |
|
3 | build_all: web react-native node worker
|
4 |
|
5 | # sockjs:
|
6 | # pushd src/runtimes/web/dom/sockjs && \
|
7 | # npm install && \
|
8 | # make build && \
|
9 | # popd
|
10 |
|
11 | json2:
|
12 | cp src/runtimes/web/dom/json2.js dist/web
|
13 | node_modules/.bin/uglifyjs dist/web/json2.js -o dist/web/json2.min.js
|
14 |
|
15 | web:
|
16 | echo "Browser Release:"
|
17 | # make sockjs
|
18 | # cp src/runtimes/web/dom/sockjs/sockjs.js dist/web
|
19 | MINIMIZE=false node_modules/webpack/bin/webpack.js --config=webpack/config.web.js
|
20 | echo "Browser Minified Release:"
|
21 | # cp src/runtimes/web/dom/sockjs/sockjs.min.js dist/web
|
22 | node_modules/webpack/bin/webpack.js --config=webpack/config.web.js
|
23 |
|
24 | react-native:
|
25 | echo "React Native Release:"
|
26 | node_modules/webpack/bin/webpack.js --config=webpack/config.react-native.js
|
27 |
|
28 | node:
|
29 | echo "NodeJS Release":
|
30 | MINIMIZE=false node_modules/webpack/bin/webpack.js --config=webpack/config.node.js
|
31 |
|
32 | worker:
|
33 | echo "Web Worker Release:"
|
34 | MINIMIZE=false node_modules/webpack/bin/webpack.js --config=webpack/config.worker.js
|
35 | echo "Web Worker Minified Release:"
|
36 | node_modules/webpack/bin/webpack.js --config=webpack/config.worker.js
|
37 |
|
38 | web_unit:
|
39 | node_modules/karma/bin/karma start spec/config/karma/unit.js
|
40 |
|
41 | web_integration:
|
42 | node_modules/karma/bin/karma start spec/config/karma/integration.js
|
43 |
|
44 | worker_unit:
|
45 | WORKER=true node_modules/karma/bin/karma start spec/config/karma/unit.js
|
46 |
|
47 | worker_integration:
|
48 | WORKER=true node_modules/karma/bin/karma start spec/config/karma/integration.js
|
49 |
|
50 | node_unit:
|
51 | node_modules/webpack/bin/webpack.js --config=spec/config/jasmine-node/webpack.unit.js && \
|
52 | node spec/config/jasmine-node/config.js ./tmp/node_unit
|
53 |
|
54 | node_integration:
|
55 | node_modules/webpack/bin/webpack.js --config=spec/config/jasmine-node/webpack.integration.js && \
|
56 | node spec/config/jasmine-node/config.js ./tmp/node_integration
|
57 |
|
58 | serve:
|
59 | node webpack/dev.server.js
|
60 |
|
61 | .PHONY: react-native build_all
|