forked from felipernb/algorithms.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
31 lines (23 loc) · 788 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
all: lint coverage
setup:
npm install
dist: all
rm -rf _build
mkdir _build
cp -r src/* _build
cp package.json _build
cp LICENSE _build
cp AUTHORS _build
cp README.md _build
cp CHANGELOG _build
lint: setup
npm run lint
test: lint
npm test
coverage: setup
istanbul cover ./node_modules/.bin/_mocha -- -R spec --recursive src/test
coveralls:
cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
VERSION := $(shell node -e "console.log(require('./package.json').version);")
browser_bundle: setup
browserify $(realpath src/index.js) --s algorithms | uglifyjs -c -m --screw-ie8 --wrap --preamble "/* algorithms.js v$(VERSION) | (c) 2015 Felipe Ribeiro | https://github.com/felipernb/algorithms.js/blob/master/LICENSE */" > bundle/algorithms.browser.min.js