forked from Khan/react-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (27 loc) · 1.01 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
.PHONY: all docs pydeps jsdeps
all: bundle.js docs
pydeps:
pip install -r requirements.txt
jsdeps:
npm install
docs: docs/preview-bundle.js docs/index.html
pages: docs
# switch to the other branch, move everything out of docs, commit, and push
git checkout gh-pages
git checkout master -- docs
cp -r docs/* .
rm -rf docs
git add .
git commit -anm "Automatic commit by $(shell git config --get user.name) ($(shell git config --get user.email))"
git push
git checkout master
bundle.js: jsdeps
./node_modules/.bin/browserify -t [ reactify --es6 ] js/*.jsx -o bundle.js
docs/index.html: pydeps
./make_template.py
docs/preview-bundle.js: jsdeps
./node_modules/.bin/browserify -d -t [ reactify --es6 ] reactify-components.jsx -o docs/preview-bundle.js
watch-preview: jsdeps
./node_modules/.bin/watchify -d -t [ reactify --es6 ] js/*.jsx reactify-components.jsx -o docs/preview-bundle.js
test: jsdeps
./node_modules/.bin/mocha --reporter spec --compilers jsx:test/compiler.js -r test/test-helper.js test/*test.jsx