-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (31 loc) · 807 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
component = node_modules/.bin/component
tester = node_modules/.bin/mocha-browser
clean:
@rm -fr build components
components:
@$(component) install --dev
build: index.js components
@$(component) build --dev
test: build
@$(tester) test/index.html
coverage:
@jscoverage index.js cov.js
@mv index.js bak.js
@mv cov.js index.js
@$(MAKE) build
@$(tester) test/index.html -R html-cov > coverage.html
@mv bak.js index.js
spm:
@echo "define(function(require, exports, module) {" > src/sanitize.js
@cat index.js >> src/sanitize.js
@echo "})" >> src/sanitize.js
@spm build
gh-pages: components
@component build
@rm -fr gh-pages
@mkdir gh-pages
@mv build gh-pages/
@cp index.html gh-pages/index.html
@ghp-import gh-pages -n
@rm -fr gh-pages
.PHONY: components build test clean spm gh-pages