-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
39 lines (26 loc) · 844 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
31
32
33
34
35
36
37
38
39
BIN = ./node_modules/.bin
BABEL_OPTS = src/ --out-dir lib/
WEBPACK_OPTS = --debug --output-pathinfo --colors
build: node_modules/ webpack
$(BIN)/babel $(BABEL_OPTS)
build-production: node_modules/ webpack-production
NODE_ENV=production $(BIN)/babel $(BABEL_OPTS)
webpack:
$(BIN)/webpack $(WEBPACK_OPTS)
webpack-production:
NODE_ENV=production $(BIN)/webpack
watch: node_modules/
bin/parallel "$(BIN)/babel $(BABEL_OPTS) --watch" "$(BIN)/webpack $(WEBPACK_OPTS) --watch"
run: clean build
node .
run-production: clean build-production
NODE_ENV=production node .
node_modules/:
npm install
clean:
@rm -rf tmp/ lib/ public/bundle.*
distclean: clean
@rm -rf node_modules/
publish:
cap production deploy deploy:restart
.PHONY: build build-production watch webpack webpack-production run run-production clean distclean publish