forked from yandex-ui/nanoislands
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (46 loc) · 1.92 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
65
66
67
NPM_BIN=$(CURDIR)/node_modules/.bin
NPM=$(CURDIR)/node_modules/
export NPM_BIN
export NPM
MAKEFLAGS+=-j 4
all: node_modules demo/demo.yate.js nanoislands.css nanoislands.ie.css nanoislands.js unittests/tests.yate.js docs
nanoislands.css: $(shell find . -name '*.styl') node_modules
node build/build-styl.js > $@
demo/demo.yate.js: $(shell find . -name '*.yate') node_modules
$(NPM_BIN)/yate $(CURDIR)/demo/nanoislands.yate > $@
unittests/tests.yate.js: $(shell find $(CURDIR)/unittests -name '*.yate') node_modules
$(NPM_BIN)/yate $(CURDIR)/unittests/tests.yate > $@
nanoislands.ie.css: $(shell find . -name '*.styl') node_modules
node build/build-styl.js ie > $@
nanoislands.js: $(CURDIR)/blocks/nanoislands.js $(shell find $(CURDIR)/blocks -name '*.js') node_modules
$(NPM_BIN)/borschik --input=blocks/nanoislands.js --minimize=no --output=nanoislands.js
docs/js/_data.json: $(shell find $(CURDIR)/blocks -name '*.js') $(shell find $(CURDIR)/blocks -name '*.md') node_modules
node build/build-doc.js > docs/js/_data.json
docs/js/docs.yate.js: docs/docs.yate docs/js/_data.json $(shell find $(CURDIR)/blocks -name '*.js') $(shell find $(CURDIR)/blocks -name '*.yate') $(shell find $(CURDIR)/blocks -name '*.md') node_modules
$(NPM_BIN)/yate $(CURDIR)/docs/docs.yate > $(CURDIR)/docs/js/docs.yate.js
docs: docs/js/_data.json docs/js/docs.yate.js
node_modules:
npm install
watch: node_modules
$(NPM)/grunt-cli/bin/grunt watch_make
publish:
rm -rf node_modules
npm install
make clean
make
npm test
npm publish
grunt: node_modules
$(NPM_BIN)/grunt
clean-docs:
rm -rf docs/js/_data.json docs/js/docs.yate.js
clean-tests:
rm -rf unittests/tests.yate.js
clean-js:
rm -rf nanoislands.js
clean-css:
rm -rf nanoislands.css nanoislands.ie.css
clean-demo:
rm -rf demo/demo.yate.js
clean: clean-demo clean-css clean-js clean-tests clean-docs
.PHONY: all publish clean watch docs clean-docs clean-tests clean-js clean-css clean-demo