-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
39 lines (27 loc) · 864 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
.PHONY: all build
all: build
build: node_modules
dist: dist/livefyre-subscriptions.js dist/livefyre-subscriptions.min.js
# dev JS
dist/livefyre-subscriptions.js: build
mkdir -p dist
cat config/wrap-start.frag > dist/livefyre-subscriptions.js
./node_modules/.bin/browserify index.js -r ./index.js:livefyre-subscriptions >> dist/livefyre-subscriptions.js
cat config/wrap-end.frag >> dist/livefyre-subscriptions.js
# uglified JS
dist/livefyre-subscriptions.min.js: dist/livefyre-subscriptions.js
cat dist/livefyre-subscriptions.js | ./node_modules/.bin/uglifyjs > dist/livefyre-subscriptions.min.js
# if package.json changes, install
node_modules: package.json
npm install
touch $@
test: build
npm test
watch: build
mocha -w test/index.js
clean:
rm -rf node_modules dist
package: dist
env=dev
deploy: dist
./node_modules/.bin/lfcdn -e $(env)