Skip to content

Commit 1d1d8b3

Browse files
committed
chore: preview clj-docs locally
1 parent c36b52f commit 1d1d8b3

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

Diff for: build/build.clj

+8
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,11 @@
6969
:target-dir class-dir})
7070
(b/jar {:class-dir class-dir
7171
:jar-file lib-jar-file}))
72+
73+
(defn install [_]
74+
(jar [])
75+
(b/install {:class-dir class-dir
76+
:lib lib
77+
:version version
78+
:jar-file lib-jar-file
79+
:basis basis}))

Diff for: resources/CLJ_JQ_VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.9-SNAPSHOT
1+
1.1.0

Diff for: script/cljdoc-preview

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ mkdir -p /tmp/cljdoc
55
version=$(cat resources/CLJ_JQ_VERSION)
66

77
echo "---- cljdoc preview: installing jar in local repo"
8-
mvn install
8+
clojure -T:build install
99

1010
echo "---- cljdoc preview: ingesting clj-jq"
1111
docker run --rm -v "$PWD:/clj-jq" \
1212
-v "$HOME/.m2:/root/.m2" -v /tmp/cljdoc:/app/data --entrypoint "clojure" \
13-
cljdoc/cljdoc -A:cli ingest -p lt.jocas/clj-jq -v "$version" \
13+
cljdoc/cljdoc -M:cli ingest -p lt.jocas/clj-jq -v "$version" \
1414
--git /clj-jq
1515

16+
echo "---- open docs in browser"
17+
firefox http://localhost:8000/d/lt.jocas/clj-jq/
18+
1619
echo "---- cljdoc preview: starting server on port 8000"
1720
docker run --rm -p 8000:8000 -v /tmp/cljdoc:/app/data cljdoc/cljdoc
18-
# go directly to http://localhost:8000/d/lt.jocas/clj-jq/, not via the search

0 commit comments

Comments
 (0)