Skip to content

gr0uch/s2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

test status

s2 is a function for reactive web UI.

See the documentation page for usage details.

Benchmarks

See js-framework-benchmark results table.

Flags

  • s2.debug: turn on messages in the console. Warning: has a performance impact.
  • s2.isDeferred (experimental): this will defer setting proxy values until the next frame. This might be preferable if there is significant blocking in between updates. However, it can break functionality in case there are updates that depend on a previous update in the same tick.
  • s2.window: set a different global object for server-side rendering.

Development

s2 is written in the Parenscript subset of Common Lisp.

Need to build the psbuild binary from parenscript-builder and put it here to compile with make. I couldn't figure out how to automate including this dependency yet.

Testing

Run automated tests with Deno:

make && deno test

Manual testing pages

Run a web server like http-server . and then navigate to the /test/ directory. HTTP is required for loading modules.

Name

s2 is short for simulacra 2. Prior art: I wrote a similar library that is limited to ES5, so no proxies.

License

BSD 3-Clause