-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (22 loc) · 1.2 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
build:
npm run build
rm -rf dist
mkdir -p dist
NODE_ENV=development ./node_modules/.bin/browserify index.js --standalone=dva -u react -u react-dom -g browserify-shim -t envify > dist/dva.js
NODE_ENV=development ./node_modules/.bin/browserify router.js --standalone=dva.router -u react -u react-dom -g browserify-shim -t envify > dist/router.js
NODE_ENV=development ./node_modules/.bin/browserify fetch.js --standalone=dva.fetch -u react -u react-dom -g browserify-shim -t envify > dist/fetch.js
NODE_ENV=development ./node_modules/.bin/browserify effects.js --standalone=dva.effects -u react -u react-dom -g browserify-shim -t envify > dist/effects.js
./node_modules/.bin/uglifyjs -o dist/dva-min.js dist/dva.js
./node_modules/.bin/uglifyjs -o dist/router-min.js dist/router.js
./node_modules/.bin/uglifyjs -o dist/fetch-min.js dist/fetch.js
./node_modules/.bin/uglifyjs -o dist/effects-min.js dist/effects.js
copy:
cp lib/* ./examples/user-dashboard/node_modules/dva/lib/
cp lib/* ./examples/count/node_modules/dva/lib/
cp lib/* ./examples/friend-list/node_modules/dva/lib/
cp lib/* ./examples/popular-products/node_modules/dva/lib/
publish: build
npm publish
publish-sync: publish
cnpm sync dva
tnpm sync dva