Liking cljdoc? Tell your friends :D

hyper.component.bundle

Assembly and serving support for the client-components JS bundle.

Components registered in hyper.component/registry* are assembled into a single ES module — squint core import, the hyper component runtime (resources/hyper/component-runtime.js), then each compiled component — served at /hyper/components.js (see hyper.server) and injected into the page head with a content-hashed URL (see hyper.render), which makes the response immutable-cacheable and lets REPL redefinition hot-swap the bundle over SSE.

Assembly and serving support for the client-components JS bundle.

Components registered in hyper.component/registry* are assembled into a
single ES module — squint core import, the hyper component runtime
(resources/hyper/component-runtime.js), then each compiled component —
served at /hyper/components.js (see hyper.server) and injected into the
page head with a content-hashed URL (see hyper.render), which makes the
response immutable-cacheable and lets REPL redefinition hot-swap the
bundle over SSE.
raw docstring

bundleclj

(bundle)
(bundle {:keys [squint-core-url]})

Assemble (or return cached) the components JS bundle.

Returns {:js "..." :hash "..."} or nil when no components are registered. The bundle is a single ES module: squint core import, the hyper component runtime, then each registered component sorted by name. Cached against the registry snapshot + core URL.

Assemble (or return cached) the components JS bundle.

Returns {:js "..." :hash "..."} or nil when no components are
registered.  The bundle is a single ES module: squint core import,
the hyper component runtime, then each registered component sorted
by name.  Cached against the registry snapshot + core URL.
sourceraw docstring

default-squint-core-urlclj

CDN URL for squint's core.js runtime, version-matched to the compiler dependency in deps.edn. Override via the :squint-core-url option on create-handler to self-host.

CDN URL for squint's core.js runtime, version-matched to the compiler
dependency in deps.edn.  Override via the :squint-core-url option on
create-handler to self-host.
sourceraw docstring

head-script-tagclj

(head-script-tag base-path opts)

Hiccup script tag for the components bundle, or nil when no components are registered. The content hash is carried in the query string so the endpoint can serve immutable cache headers and a registry change rotates the URL (which, combined with head-element fingerprint diffing, makes REPL redefinition hot-swap the bundle over SSE).

Hiccup script tag for the components bundle, or nil when no components
are registered.  The content hash is carried in the query string so the
endpoint can serve immutable cache headers and a registry change rotates
the URL (which, combined with head-element fingerprint diffing, makes
REPL redefinition hot-swap the bundle over SSE).
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close