forked from otalk/jingle-session
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (26 loc) · 796 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
40
41
NAME = jinglemedia
STANDALONE = JingleMediaSession
MAIN = index.js
SHELL = /bin/bash
PATH := ./node_modules/.bin:$(PATH)
LIB = $(shell find lib -name '*.js')
# -- Tasks ------------------------------------------------------------
.PHONY: all lint test audit clean
all: test build audit
build: build/$(NAME).zip
clean:
rm -rf build
test: lint
covert test/index.js | tap-spec
lint:
jshint .
audit:
nsp package
# -- Build artifacts --------------------------------------------------
build/$(NAME).zip: build/$(NAME).bundle.js build/$(NAME).bundle.min.js
zip -j $@ $^
build/$(NAME).bundle.js: $(MAIN) $(LIB)
mkdir -p build
browserify --standalone $(STANDALONE) $(MAIN) > $@
build/$(NAME).bundle.min.js: build/$(NAME).bundle.js
uglifyjs --screw-ie8 build/$(NAME).bundle.js > $@