forked from Sannis/node-pinba
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (29 loc) · 1.1 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
#!/bin/sh
CURR_HEAD_SHA := $(firstword $(shell git show-ref --hash HEAD | cut -b -6) master)
GITHUB_PROJECT_NAME := Sannis/node-pinba
GITHUB_PROJECT_URL := https://github.com/${GITHUB_PROJECT_NAME}
API_SRC_URL_FMT := https://github.com/${GITHUB_PROJECT_NAME}/blob/${CURR_HEAD_SHA}/{file}\#L{line}
API_DEST_DIR := ./doc/api
all: npm-install
npm-install: npm-install-stamp
npm-install-stamp:
npm install
touch npm-install-stamp
clean:
rm -rf ./node_modules
rm -f npm-install-stamp
test: npm-install
./node_modules/.bin/mocha test/test.js --slow 333 -R spec
test-coveralls: npm-install
rm -rf ./lib-cov && ./node_modules/.bin/jscoverage lib lib-cov
LIB_COV=1 ./node_modules/.bin/mocha test/test.js --slow 333 -R mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js
lint: npm-install
./node_modules/.bin/jshint . --show-non-errors
doc: ./lib/pinba.js
rm -rf ${API_DEST_DIR}
./node_modules/.bin/ndoc \
--gh-ribbon ${GITHUB_PROJECT_URL} \
--link-format ${API_SRC_URL_FMT} \
--output ${API_DEST_DIR} \
./lib/pinba.js
.PHONY: all npm-install clean test test-coveralls lint doc