aboutsummaryrefslogtreecommitdiff
path: root/makefile
blob: 6088d407605741c6b0f6a3071962dfefae2b4336 (plain)
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
.PHONY: test mammoth.browser.js npm-install

test:
	npm test

setup: npm-install static/jszip mammoth.browser.min.js

npm-install:
	npm install

static/jszip:
	mkdir -p _build/jszip
	curl -L https://github.com/Stuk/jszip/archive/v1.0.1.tar.gz | tar xz --directory _build/jszip --strip-components 1
	mkdir -p static/jszip
	cp _build/jszip/*.js static/jszip
	
mammoth.browser.js:
	rm $@ -f
	cat static/jszip/jszip.js >> $@
	cat static/jszip/jszip-deflate.js >> $@
	cat static/jszip/jszip-inflate.js >> $@
	cat static/jszip/jszip-load.js >> $@
	node_modules/.bin/node-license-sniffer . --recurse --js-comment >> $@
	node_modules/.bin/browserify lib/index.js --standalone mammoth >> $@

mammoth.browser.min.js: mammoth.browser.js
	node_modules/.bin/uglifyjs mammoth.browser.js -c > $@