forked from particle-iot/sparkjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (26 loc) · 1.02 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
BIN := ./node_modules/.bin
TEST_FILES := test/support/env.js $(shell find test/specs -type f -name "*.js")
VERSION := $(shell node -e "console.log(require('./package.json').version)")
.PHONY: cover test lint
test:
@$(BIN)/mocha --colors $(TEST_FILES)
cover:
@$(BIN)/istanbul cover $(BIN)/_mocha $(TEST_FILES) -- -R spec
lint:
@$(BIN)/jshint ./lib
bundle:
@$(BIN)/browserify lib/spark-browser.js -t cssify | $(BIN)/uglifyjs > dist/spark.min.js
bundle-dev:
@$(BIN)/browserify lib/spark-browser.js -t cssify > dist/spark.js
release:
@$(BIN)/browserify lib/spark-browser.js -t cssify | $(BIN)/uglifyjs > dist/spark.min.js
@git tag -m "$(VERSION)" v$(VERSION)
@git push --tags
# When publishing; cdnjs, bower, jsdelivr will pick up the new package version
# from either npm registry or github.
# There is no need to run bower register again, this is a one time process,
# command left here just for future reference.
publish:
#@$(BIN)/bower register spark [email protected]:spark/sparkjs.git
@npm publish ./
@$(BIN)/jam publish