forked from stylus/stylus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (32 loc) · 1.05 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
SRC = $(shell find lib -name "*.js")
TM_BUNDLE = editors/Stylus.tmbundle
define DETERMINE_TEXTMATE_BUNDLE_PATH
cd /tmp && \
cp /Applications/TextMate.app/Contents/Info.plist /tmp/textmate-info.plist && \
plutil -convert json -r /tmp/textmate-info.plist && \
(test `node -e " \
var json = $$(cat /tmp/textmate-info.plist | tr "\n" " "); \
console.log(json['CFBundleShortVersionString'][0]); \
"` -gt 1) && \
echo ~/Library/Application\ Support/TextMate/Managed/Bundles || \
echo ~/Library/Application\ Support/TextMate/Bundles
endef
TM_BUNDLE_DEST = $(shell $(DETERMINE_TEXTMATE_BUNDLE_PATH))
REPORTER = dot
test:
@./node_modules/.bin/mocha \
--require should \
--bail \
--reporter $(REPORTER)
test-cov: lib-cov
STYLUS_COV=1 $(MAKE) REPORTER=html-cov > coverage.html
lib-cov: lib
jscoverage $< $@
install-bundle:
mkdir -p "$(TM_BUNDLE_DEST)"
cp -fr "$(TM_BUNDLE)" "$(TM_BUNDLE_DEST)"
update-bundle:
cp -fr "$(TM_BUNDLE_DEST)"/Stylus.tmbundle editors
benchmark:
@node bm.js
.PHONY: test install-bundle update-bundle benchmark test-cov