File tree Expand file tree Collapse file tree 10 files changed +1258
-13
lines changed
Expand file tree Collapse file tree 10 files changed +1258
-13
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,34 @@ bb release
6565
6666The new release will appear on Clojars.
6767
68+ ## Publishing JS
69+
70+ > ** Note**
71+ > To publish ` emmy-viewers ` JS, you must be part of the [ InferenceQL
72+ > GitHub organization] ( https://github.com/inferenceql ) .
73+
74+ - Create a classic personal access token with ` read:org ` permissions.
75+ - Add a line like this to your bash profile:
76+
77+ ``` bash
78+ export GITHUB_TOKEN=" <your_token>"
79+ ```
80+
81+ Run the following code with the ` :nextjournal/clerk ` alias activated:
82+
83+ ``` clojure
84+ (require '[mentat.clerk-utils.build :as b])
85+
86+ (b/release->cas!
87+ {:cljs-namespaces '[gen.sci-extensions]
88+ :cas-namespace " inferenceql"
89+ :prefix " gen.clj"
90+ :token (System/getenv " GITHUB_TOKEN" )})
91+ ```
92+
93+ - Take the resulting URL and replace the existing entry at
94+ ` emmy.clerk/custom-js ` with the new URL that prints.
95+
6896## Linting
6997
7098Code is linted with [ ` clj-kondo ` ] ( https://github.com/clj-kondo/clj-kondo ) :
Original file line number Diff line number Diff line change 1+ (ns gen.sci-extensions
2+ " SCI environment extensions, meant to apply to the Gen.clj Clerk documentation
3+ build."
4+ (:require [gen.sci]))
5+
6+ (gen.sci/install! )
Original file line number Diff line number Diff line change 11(ns user
2- (:require [nextjournal .clerk :as clerk]))
2+ (:require [gen .clerk :as clerk]))
33
44(set! *warn-on-reflection* true )
55
88
99(def notebooks
1010 [" examples/introduction.clj"
11- " examples/intro_to_modeling.clj" ])
11+ " examples/intro_to_modeling.clj"
12+ " examples/intro_to_modeling/edit.clj" ])
1213
1314(def defaults
14- {:index index})
15+ {:index index
16+ ; ; Enable / uncomment this when working on new components.
17+ ; ; :cljs-namespaces '[gen.sci-extensions]
18+ })
1519
1620(def serve-defaults
1721 (assoc defaults
2731(defn serve!
2832 ([] (serve! {}))
2933 ([opts]
30- (let [{:keys [browse? index] :as opts} (merge serve-defaults opts)]
31- (when (and browse? index)
32- (clerk/show! index))
33- (clerk/serve! opts))))
34+ (clerk/serve!
35+ (merge serve-defaults opts))))
3436
3537(def halt! clerk /halt! )
3638
37- (defn build!
38- ([] (build! {}))
39- ([opts]
40- (clerk/build!
41- (merge static-defaults opts))))
39+ (defn build! [opts]
40+ (clerk/build!
41+ (merge static-defaults opts)))
You can’t perform that action at this time.
0 commit comments