Versions of nextjournal.clerk/{build!,serve!,halt!} that support custom CLJS compilation.
Versions of `nextjournal.clerk/{build!,serve!,halt!} that support custom CLJS compilation.`
(build! {:keys [cljs-namespaces out-path cname]
:or {out-path "public/build"}
:as opts})
Version of [[nextjournal.clerk/build!]] that supports custom CLJS compilation.
In addition to all options supported by Clerk's build!
, build!
supports
the following options:
:cljs-namespaces
: a sequence of CLJS namespaces to compile and make
available to Clerk. If provided, build!
will compile a custom CLJS bundle
and configure Clerk to use this bundle instead of its default. Defaults to
nil
.
:cname
: string denoting the custom hostname from which the site will be
served. If provided, build!
will create a CNAME
file containing the
value in (:out-path opts)
. Defaults to nil
.
The only other difference is that build!
populates :git/sha
if it hasn't
been provided.
All remaining opts
are forwarded to [[nextjournal.clerk/build!]]
Version of [[nextjournal.clerk/build!]] that supports custom CLJS compilation. In addition to all options supported by Clerk's `build!`, [[build!]] supports the following options: - `:cljs-namespaces`: a sequence of CLJS namespaces to compile and make available to Clerk. If provided, [[build!]] will compile a custom CLJS bundle and configure Clerk to use this bundle instead of its default. Defaults to `nil`. - `:cname`: string denoting the custom hostname from which the site will be served. If provided, [[build!]] will create a `CNAME` file containing the value in `(:out-path opts)`. Defaults to `nil`. The only other difference is that [[build!]] populates `:git/sha` if it hasn't been provided. All remaining `opts` are forwarded to [[nextjournal.clerk/build!]]
(halt!)
Version of [[nextjournal.clerk/halt!]] that additionally kills any shadow-cljs processes, if they are running.
Version of [[nextjournal.clerk/halt!]] that additionally kills any shadow-cljs processes, if they are running.
(serve! {:keys [cljs-namespaces browse? index] :as opts})
Version of [[nextjournal.clerk/serve!]] that supports custom CLJS compilation
via shadow-cljs
.
In addition to all options supported by Clerk's serve!
, serve!
supports
the following options:
:cljs-namespaces
: a sequence of CLJS namespaces to compile and make
available to Clerk. If provided, serve!
will compile a custom CLJS bundle
and configure Clerk to use this bundle instead of its default.
:shadow-options
: these options are forwarded
to mentat.clerk-utils.build.shadow/watch!
. See that function's docs for
more detail.
This bundle is served from a running shadow-cljs server and recompiled when
any dependency or namespace changes. Defaults to nil
.
The only other difference is that if (:browse? opts)
is true
, serve!
calls [[nextjournal.clerk/show!]] automatically on (:index opts)
if
provided.
All remaining opts
are forwarded to [[nextjournal.clerk/serve!]].
Version of [[nextjournal.clerk/serve!]] that supports custom CLJS compilation via `shadow-cljs`. In addition to all options supported by Clerk's `serve!`, [[serve!]] supports the following options: - `:cljs-namespaces`: a sequence of CLJS namespaces to compile and make available to Clerk. If provided, [[serve!]] will compile a custom CLJS bundle and configure Clerk to use this bundle instead of its default. - `:shadow-options`: these options are forwarded to [[mentat.clerk-utils.build.shadow/watch!]]. See that function's docs for more detail. This bundle is served from a running shadow-cljs server and recompiled when any dependency or namespace changes. Defaults to `nil`. The only other difference is that if `(:browse? opts)` is `true`, [[serve!]] calls [[nextjournal.clerk/show!]] automatically on `(:index opts)` if provided. All remaining `opts` are forwarded to [[nextjournal.clerk/serve!]].
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close