-
Notifications
You must be signed in to change notification settings - Fork 70
/
Makefile
59 lines (46 loc) · 1.66 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
HBS := $(shell find lib/template/ -name "*.hbs")
JS := $(shell find lib/ -name "*.js")
SABRE_DAV_VERSION=2.1.11
SABRE_DAV_RELEASE=sabredav-$(SABRE_DAV_VERSION)
SABRE_DAV_ZIPBALL=$(SABRE_DAV_RELEASE).zip
dav.zip: dav.js dav.min.js dav.js.map
zip dav dav.js dav.js.map dav.min.js
dav.min.js dav.js.map: dav.js node_modules
./node_modules/.bin/minify dav.js \
--out-file ./dav.min.js
dav.js: build node_modules
rm -rf dav.js /tmp/dav.js
./node_modules/.bin/browserify --standalone dav ./build/index.js \
-t [ babelify --presets [ @babel/preset-env ] ] \
--outfile /tmp/dav.js
cat lib/polyfill/*.js /tmp/dav.js > dav.js
build: $(JS) $(HBS) node_modules
rm -rf build/
./node_modules/.bin/babel lib \
--modules common \
--out-dir build \
--stage 4
node_modules: package.json
npm install
.PHONY: clean
clean:
rm -rf *.zip SabreDAV build coverage dav.* node_modules test/integration/server/SabreDAV
.PHONY: test
test: test-unit test-integration
.PHONY: test-unit
test-unit: node_modules
./node_modules/.bin/mocha test/unit
.PHONY: test-integration
test-integration: node_modules test/integration/server/SabreDAV
./node_modules/.bin/mocha test/integration
.PHONY: toc
toc: node_modules
./node_modules/.bin/doctoc CONTRIBUTING.md
./node_modules/.bin/doctoc HISTORY.md
./node_modules/.bin/doctoc README.md
test/integration/server/SabreDAV: SabreDAV
cp -r SabreDAV test/integration/server/SabreDAV
cd test/integration/server/SabreDAV && cp ../calendarserver.php calendarserver.php
SabreDAV:
wget -O $(SABRE_DAV_ZIPBALL) https://github.com/sabre-io/dav/releases/download/$(SABRE_DAV_VERSION)/$(SABRE_DAV_ZIPBALL)
unzip -q $(SABRE_DAV_ZIPBALL)