forked from yandex-ui/noscript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (37 loc) · 1.24 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
export NPM_BIN:=$(CURDIR)/node_modules/.bin
# it should be export PATH:=$(CURDIR)/node_modules/.bin:$(PATH)
# but there is bug in OSX https://discussions.apple.com/thread/2520853
# сборка для npm
dist: build/*.js src/*.js | node_modules
mkdir -p dist
$(NPM_BIN)/borschik -i build/src.client.js -o dist/noscript.js -m no
$(NPM_BIN)/borschik -i build/src.client.js -o dist/noscript.min.js -m yes
$(NPM_BIN)/borschik -i build/src.server.js -o dist/noscript.module.js -m no
touch dist
node_modules: package.json
npm install
touch node_modules
# Тесты
.PHONY: test test-jshint test-node test-karma yate
test:
$(MAKE) test-jshint
$(MAKE) test-karma test-node
test-jshint: dist | node_modules
$(NPM_BIN)/jshint src
$(NPM_BIN)/jscs src
test-node: dist yate | node_modules
$(NPM_BIN)/mocha test/node
test-karma: dist yate | node_modules
./node_modules/karma/bin/karma start
yate: test/tests.yate.js
test/tests.yate.js: test/tests.yate yate/noscript.yate | node_modules
$(NPM_BIN)/yate $< > $@
# публикация npm
npm-publish: dist
npm publish
gh-pages:
git clone -b gh-pages --reference ./ [email protected]:yandex-ui/noscript.git gh-pages
jsdoc: gh-pages
$(MAKE) -C gh-pages
jsdoc-publish: gh-pages
$(MAKE) -C gh-pages publish