Skip to content

Commit edbb797

Browse files
committed
Add instructions, fix log warnings, move clojure2d to separate alias
Splitting out clojure2d reduces downloaded deps from 1,1GB to ~130mb.
1 parent 16b7666 commit edbb797

File tree

3 files changed

+40
-14
lines changed

3 files changed

+40
-14
lines changed

README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
1-
# Clerk Examples and Demos
1+
# 🤹 Clerk Demo
22

3-
This is a preview of Clerk before its open source release. See the
4-
[Clerk README](https://nextjournal.com/mk/clerk-preview) for more information.
3+
This is a bucket of interesting of Clerk Demos.
54

6-
To play with this, eval forms in [dev/user.clj](dev/user.clj).
5+
## Usage
6+
7+
To play with this, you need to have [Clojure
8+
installed](https://clojure.org/guides/install_clojure), then run:
9+
10+
``` shell
11+
clj -M:nextjournal/clerk nextjournal.clerk/serve! --paths notebooks --port 7777 --browse
12+
```
13+
14+
This will start the Clerk webserver on port 7777 and watch the
15+
`notebooks/` directory for changes and open Clerk in your
16+
browser.
17+
18+
Open one of the files there, e.g. `rule_30.clj`, make a
19+
change and save it. You should then see these changes reflected in the
20+
browser.
21+
22+
## From your Editor
23+
24+
For interactive development, it is recommended you let your editor
25+
start the project (`jack-in`), if asked you should select `deps.edn` as
26+
the project type.
27+
28+
Then, evaluate forms in `dev/user.clj`.

deps.edn

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{:paths ["dev" "notebooks" "resources"]
2-
:deps {io.github.nextjournal/clerk {:mvn/version "0.11.603"}
2+
:deps {io.github.nextjournal/clerk {:git/sha "fa0ddcf000bbcd211008c93d8bd0b3047629f6b6"}
33
io.github.nextjournal/clerk-slideshow {:git/sha "ea9b27e5ec2e5ad57e889060521451ed9138325b"}
44

55
;; keep 1.10 until `kixi/stats` and `sicmutils` fix warnings
@@ -11,7 +11,7 @@
1111
org.xerial/sqlite-jdbc {:mvn/version "3.34.0"}
1212
dk.ative/docjure {:mvn/version "1.16.0"}
1313
clojusc/wordnet {:mvn/version "1.2.0"}
14-
clj-jgit/clj-jgit {:mvn/version "1.0.2"}
14+
clj-jgit/clj-jgit {:mvn/version "1.0.2" :exclusions [org.slf4j/slf4j-api]}
1515

1616
;; some statistical routines
1717
kixi/stats {:mvn/version "0.5.4"}
@@ -20,17 +20,17 @@
2020
sicmutils/sicmutils {:mvn/version "0.22.0"}
2121

2222
;; semantic web goodies and box/arrow graphs
23-
jackrusher/mundaneum {:git/url "https://github.com/jackrusher/mundaneum/"
24-
:git/sha "d2c934a12388d88ddb3e53fef92ec2eef97d6140"}
23+
io.github.jackrusher/mundaneum {:git/sha "d2c934a12388d88ddb3e53fef92ec2eef97d6140"}
2524
arrowic/arrowic {:mvn/version "0.1.1"}
2625

27-
;; 2D drawing routines
28-
clojure2d/clojure2d {:mvn/version "1.4.4"}
29-
26+
3027
;; OSC server
31-
com.illposed.osc/javaosc-core {:mvn/version "0.8"}
28+
com.illposed.osc/javaosc-core {:mvn/version "0.8" :exclusions [org.slf4j/slf4j-api org.slf4j/slf4j-log4j12]}
29+
30+
org.babashka/cli {:mvn/version "0.5.40"}
3231

33-
org.babashka/cli {:mvn/version "0.5.40"}}
32+
;; silence log warnings
33+
org.slf4j/slf4j-nop {:mvn/version "1.7.36"}}
3434

3535
:aliases {:nextjournal/clerk {:extra-paths ["datasets"]
3636
:exec-fn nextjournal.clerk/build!
@@ -45,4 +45,5 @@
4545
"notebooks/sicmutils.clj"
4646
"notebooks/rule_30.clj"
4747
"notebooks/zipper_with_scars.clj"]}
48-
:main-opts ["-m" "babashka.cli.exec"]}}}
48+
:main-opts ["-m" "babashka.cli.exec"]}
49+
:clojure2d {:extra-deps {clojure2d/clojure2d {:mvn/version "1.4.4"}}}}}

notebooks/logo.clj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
;; # 🎨 Making a Clerk Logo
22
^{:nextjournal.clerk/visibility {:code :fold}}
33
(ns logo
4+
"A notebook generating the Clerk's logo.
5+
6+
Note that to run this, the `:clojure2d` needs to be added."
47
(:require [nextjournal.clerk :as clerk]
58
[clojure2d.core :as c2d]
69
[fastmath.complex :as complex]

0 commit comments

Comments
 (0)