Installation

You start with one script tag and no build step. Where you use a bundler, import it as a module.

It is still at the PoC stage, so it is not published to a package registry. For now, in the , run bun run build and use the files it builds in dist/.

Plain script tag

Load hyper-scope.iife.js and call HyperScope.start().

If you see the text on the screen, you are done. You can call start() in head. It mounts the scopes after the document has been fully read, and follows anything inserted after that.

Module

Put the script in head

There must be one runtime per document. Tools that swap the page, such as Turbo, run the scripts inside body again on every visit, so put the script in head.

What you set at start

There are only two options.

OptionWhat it does
delimitersThe delimiters for putting values in text. The default is {{ }}. Change it if your server template uses the same marks
pluginsPlugins to add at start. It is the same as calling plugin() separately

Loading extensions

Form validation and what you use together with Turbo are not in the core. Load only what you need, separately.

→ Extensions