forked from markert/fili.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (33 loc) · 820 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
39
40
41
BIN = ./node_modules/.bin
ESLINT = $(BIN)/eslint
BROWSERIFY = $(BIN)/browserify
MOCHA = $(BIN)/mocha
UGLIFY = $(BIN)/uglifyjs
BEAUTIFY = $(BIN)/js-beautify
build:
$(BROWSERIFY) ./index.js \
--standalone Fili \
-t [babelify --stage 0] \
-t [envify --NODE_ENV production] \
-p [bannerify --file ./dist/banner.txt] \
-o ./dist/fili.js
$(UGLIFY) ./dist/fili.js --compress --mangle --comments -o ./dist/fili.min.js
eslint: src/*.js
$(ESLINT) $^
test:
npm test
beautify: index.js ./src/*.js
$(BEAUTIFY) $^ --replace
server:
python -m SimpleHTTPServer 8080
ghpages:
git checkout gh-pages
git checkout master demo/
cp demo/src.js src.js
cp demo/styles.css styles.css
rm -rf demo/
git add . --all
git commit -m "update gh-pages"
git push
git checkout master
.PHONY: eslint test build beautify ghpages