-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
38 lines (32 loc) · 1001 Bytes
/
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
BIN = ./node_modules/.bin
BOWER = $(BIN)/bower
MOCHA = $(BIN)/mocha
BOWERPATH = ./bower_components
# gh-pages
GHTMP = ../autoclasscss-gh-pages-tmp
GHLIB = vendor
VERSION = $(shell node -e "console.log(require('./bower.json').version)")
.PHONY: install doc gh-pages test
install:
npm install
$(BOWER) install
doc:
./bower_components/jsdoc/jsdoc autoclasscss.js -d jsdoc
test:
$(MOCHA) --reporter list test/cli/
gh-pages: doc
mkdir -p $(GHTMP)/$(GHLIB)
cp $(BOWERPATH)/jquery/jquery.min.js $(GHTMP)/$(GHLIB)/jquery.js
cp -r $(BOWERPATH)/ace/src-min/ $(GHTMP)/$(GHLIB)/ace/
cp $(BOWERPATH)/normalize-css/normalize.css $(GHTMP)/$(GHLIB)/normalize.css
cp -r jsdoc $(GHTMP)/jsdoc
rm $(GHTMP)/jsdoc/index.html
mv $(GHTMP)/jsdoc/Autoclasscss.html $(GHTMP)/jsdoc/index.html
cp autoclasscss.js $(GHTMP)/autoclasscss.js
git checkout gh-pages
cp -r $(GHTMP)/* ./
rm -rf $(GHTMP)
git add $(GHLIB) jsdoc autoclasscss.js
git commit -m 'v$(VERSION)'
git push origin gh-pages
git checkout dev