forked from ottypes/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (32 loc) · 978 Bytes
/
Makefile
File metadata and controls
43 lines (32 loc) · 978 Bytes
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
.PHONY: all lib test webclient
COFFEE=node_modules/.bin/coffee
UGLIFY=node_modules/.bin/uglifyjs
# Build the types into javascript in lib/ for nodejs
all: lib webclient
clean:
rm -rf lib
rm -rf webclient
test:
node_modules/.bin/mocha
lib:
rm -rf lib
coffee -cbo lib src
cp src/json0.js lib
webclient/%.uncompressed.js: src/%.coffee before.js after.js
mkdir -p webclient
cat before.js > $@
$(COFFEE) -bpc $< >> $@
cat after.js >> $@
webclient/json0.uncompressed.js: src/json0.js src/text-old.coffee src/helpers.js before.js after.js
mkdir -p webclient
cat before.js > $@
cat src/helpers.js >> $@
$(COFFEE) -bpc src/text-old.coffee >> $@
cat $< >> $@
cat after.js >> $@
# Uglify.
webclient/%.js: webclient/%.uncompressed.js
$(UGLIFY) $< -c unsafe=true -mo $@
# Compile the types for a browser.
webclient: webclient/json0.js webclient/text.js webclient/text-tp2.js
#webclient/json.js won't work yet - it needs the helpers and stuff compiled in as well.