-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
50 lines (34 loc) · 1.1 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
.PHONY: test jar install deploy clean edn-contexts
SOURCES := $(shell find src)
target/fluree-json-ld.jar: pom.xml deps.edn src/deps.cljs $(SOURCES)
clojure -X:jar
src/deps.cljs: package.json
clojure -M:js-deps
resources/contexts/%.edn: resources/contexts/%.jsonld
clojure -X:build-edn-context :source '"$(subst resources/,,$<)"' :dest '"$(subst resources/,,$@)"'
CONTEXTS := $(shell find resources/contexts -name '*.jsonld')
EDN_CONTEXTS := $(CONTEXTS:.jsonld=.edn)
edn-contexts: $(EDN_CONTEXTS)
pom.xml: deps.edn
clojure -Spom
cljtest:
clojure -X:test
nodetest:
npx shadow-cljs release nodejs-test
browsertest:
npx shadow-cljs release browser-test
./node_modules/karma/bin/karma start --single-run
cljstest: nodetest browsertest
test: cljtest cljstest
jar: target/fluree-json-ld.jar
install: target/fluree-json-ld.jar
clojure -X:install
# You'll need to set the env vars CLOJARS_USERNAME & CLOJARS_PASSWORD
# (which must be a Clojars deploy token now) to use this.
deploy: target/fluree-json-ld.jar
clojure -X:deploy
clean:
rm -rf target
rm -rf node_modules
rm -rf test/nodejs
rm -rf test/browser