-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (45 loc) · 1.03 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
49
50
51
52
53
54
55
56
57
58
59
60
BIN = $(PWD)/node_modules/.bin
GBIN = $(npm -g bin)
# BABEL = [[ -f $(npm -g bin)/babel ]] && $(npm -g bin)/babel || $(BIN)/babel
BABEL = [[ -d $(npm -g root)/babel ]] && babel || $(BIN)/babel
all: es6
# es6: lib
# @mkdir -p build/
# @for path in src/*.js; do \
# file=`basename $$path`; \
# $(BIN) "build/$$file" > "build/$$file"; \
# done
# Compile ES6 from `src` to ES5 in `dist`
# =======================================
run:
rm -rf build/
make build
build:
babel app -d build
postinstall:
# [[ -d $(npm -g root)/babel ]] || npm i babel
make build
# Development
# ===========
develop:
$(BIN)babel-node $@
# Publish package to npm
# @see npm/npm#3059
# =======================
publish: all
npm publish
# Release, publish
# ================
# "patch", "minor", "major", "prepatch",
# "preminor", "premajor", "prerelease"
VERS ?= "patch"
TAG ?= "latest"
release: all
npm version $(VERS) -m "Release %s"
npm publish --tag $(TAG)
git push --follow-tags
# Tools
# =====
rebuild:
rm -rf node_modules
npm install