-
-
Notifications
You must be signed in to change notification settings - Fork 586
/
Makefile
48 lines (38 loc) · 1.06 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
43
44
45
46
47
48
PATH := node_modules/.bin:$(PATH)
SHELL := /bin/bash
lint:
# Run ESLint guidelines against codebase
eslint src/*.js
clean:
# Deletes node_modules, docs, and builds
nwb clean-module
rm -r docs
build:
# Generates builds for multiple target environments:
# - A CommonJS build in lib/
# - An ES6 modules build in es/
# - UMD development and production builds in umd/
# ALso, copy index.d.ts to ./lib folder.
nwb build-web-module && cp -R src/types ./lib
authors:
# Generate a file of all contributors based on git log
git log --format='%aN <%aE>' | sort -f | uniq > AUTHORS
publish:
# Prepares and publishes the module to NPM
# Bumps package.json version, git commits, and tags
npm version $(filter-out $@,$(MAKECMDGOALS)) -m "Releasing v%s"
git push origin master --follow-tags
$(MAKE) build
$(MAKE) test
# Publishes to NPM
npm publish
test:
# Runs test suite
nwb test
test-coverage:
# Generates test coverage report
nwb test --coverage
open ./coverage/html/index.html
test-watch:
# Watches for file changes and re-runs test
nwb test --server