This repository has been archived by the owner on Nov 19, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (52 loc) · 1.48 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
NPM_BIN = $(shell npm bin)
build: buildLib buildDist
buildDist:
$(NPM_BIN)/webpack --config config/webpack.config.js &
export NODE_ENV=production; \
$(NPM_BIN)/webpack --config config/webpack.config.js -p
buildLib:
for packageDir in packages/*/ ; do \
$(NPM_BIN)/babel $$packageDir/src --out-dir $$packageDir/lib ; \
done
cleanMergeDocs:
git merge -s ours origin/gh-pages --no-edit
git checkout gh-pages
rm -rf docs
cp -pR _docs docs
commitDocsOnly:
git add docs
git commit -a -m "publish docs update"
docs:
rm -rf _docs
for packageDir in packages/*/ ; do \
$(NPM_BIN)/jsdoc $$packageDir/src -r -d _docs/$$packageDir --readme $$packageDir/README.md ; \
done
cp -pR docs-static/* _docs
lint:
$(NPM_BIN)/eslint packages/. --ext .js --cache
ifeq ($(TRAVIS_BRANCH)$(TRAVIS_PULL_REQUEST), masterfalse)
publishDocs: travisDocsSetup docs cleanMergeDocs commitDocsOnly
git push origin gh-pages
else
publicDocs:
@echo Not a master build, won't publish docs update.
endif
publish: update test buildDist buildLib
for packageDir in packages/*/ ; do \
(cd $$packageDir && npm publish) ; \
done
test: lint
ifeq ($(CI), true)
$(NPM_BIN)/karma start config/karma.conf.js
else
$(NPM_BIN)/karma start config/karma.dev.conf.js
endif
travisDocsSetup:
git config user.name "Modern Uploader Travis-CI agent"
git config user.email "[email protected]"
git remote rm origin
@git remote add origin "https://${GH_TOKEN}@${GH_REF}"
git fetch --all
git checkout master
update:
npm install