-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
35 lines (32 loc) · 956 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
TESTS = test/*.test.coffee # test/6.test.coffee
REPORTER = spec
NAME := $(shell node -e "console.log(JSON.parse(require(\
'fs').readFileSync('package.json', 'utf8')).name)")
VERSION := $(shell node -e "console.log(JSON.parse(require(\
'fs').readFileSync('package.json', 'utf8')).version)")
TARBALL := $(NAME)-$(VERSION).tgz
build:
@NODE_ENV=build mkdir -p lib/web
@cp src/web/fairy.html lib/web/fairy.html
@cp src/web/fairy.css lib/web/fairy.css
@cp -r src/web/vendor lib/web/vendor
@coffee -c$(opt) -o lib src
test:
@rm -f test/workers/*.dmp
@NODE_ENV=test ./node_modules/.bin/mocha --compilers coffee:coffee-script/register \
--reporter $(REPORTER) \
--timeout 0 \
--slow 50000 \
--ui bdd \
$(TESTS)
publish:
@rm -Rf package
@mkdir package
@cp -R lib package/lib
@cp -R web package/web
@cp package.json package
@cp README.md package
@cp LICENSE package
@tar czf $(TARBALL) package
@rm -r package
.PHONY: test build