-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (34 loc) · 896 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
40
41
42
43
44
45
NODE = node
NODE_OPTS = --use-strict
NPM = npm
MOCHA = ./node_modules/.bin/_mocha
TEST = test/**/*_test.js
NPM_REBUILD = $(NPM) --ignore-scripts false rebuild --build-from-source
love:
@echo "Feel like makin' love."
test:
@$(NODE) $(NODE_OPTS) $(MOCHA) -R dot $(TEST)
spec:
@$(NODE) $(NODE_OPTS) $(MOCHA) -R spec $(TEST)
autotest:
@$(NODE) $(NODE_OPTS) $(MOCHA) -R dot --watch $(TEST)
autospec:
@$(NODE) $(NODE_OPTS) $(MOCHA) -R spec --watch $(TEST)
pack:
@file=$$(npm pack); echo "$$file"; tar tf "$$file"
publish:
$(NPM) publish
tag:
git tag "v$$($(NODE) -e 'console.log(require("./package").version)')"
rebuild:
$(NPM_REBUILD) sqlite3
cd node_modules/better-sqlite3 && \
$(NPM) --ignore-scripts false run build-release
clean:
-$(RM) *.tgz
$(NPM) prune --production
.PHONY: love
.PHONY: test spec autotest autospec
.PHONY: pack publish tag
.PHONY: rebuild
.PHONY: clean