0.7.2 • Published 4 months ago

stage1 v0.7.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Build status Coverage status NPM version NPM bundle size (minified + gzip) Licence

stage1

High-performance JavaScript micro framework.

Warning: This is alpha software. Test thoroughly before using in production. Please report any bugs you find!

Originally a fork of the excellent https://github.com/Freak613/stage0 project.

TODO

  • Add documentation about:
    • Internal use of innerHTML — potencial risk of XSS etc.; never use h and html functions with untrusted input
    • New DOM utility functions
      • createFragment
      • create
      • append
      • prepend
      • onRemove
    • New reactive store feature
    • Differences from the original stage0 project:
      • There are now 2 runtime modes:
        • New pre-compiled runtime mode for ultimate performance. Compiles templates at build-time via a bun macro that minifies templates, generates metadata, and then includes minimal runtime code in your JS bundle. Currently only works with Bun.build.
        • The regular mode is still availiable which generates metadata when your JS is run in the browser. Regular mode can be used with or without a build process.
      • Ref nodes are now marked with @ rather than #
      • h is now function h(template: string): S1Node e.g., h('<p>@key<p>')
      • html is available to use as a string template literal tag function e.g., html`<p>@key<p>` (regular mode only)
      • view.collect is now a collect function that needs to be imported seperately
      • Extra DOM utils
      • New reactive store factory can be imported from stage1/store
      • Improved TypeScript support
      • Reduced size and improved load and runtime performance
      • Import paths:
        • Other than reconcilers and the store, everything is a named export from stage1
        • Reconcilers all export a reconcile function
        • /keyed --> /reconcile/keyed
        • /reconcile --> /reconcile/non-keyed
        • /reuse-nodes --> /reconcile/reuse-nodes
    • Ref names must be lowercase because some browsers normalise element attribute names when rendering HTML
  • Add API and usage documentation
  • Add more tests
  • Add examples
  • Set up benchmarking + compare to stage0 and other JS frameworks
  • Submit to https://github.com/krausest/js-framework-benchmark

Browser support

Note: Internet Explorer is not supported.

Minimum browser version required:

  • Chrome 26
  • Edge 13
  • Firefox 22
  • Safari 8
  • Opera 15

Some optional features require a higher browser version:

SSR (server-side rendering) is not supported and is not the intended use of this library.

Bugs

Please report any bugs you encounter on the GitHub issue tracker.

Changelog

See releases on GitHub.

License

MIT license. See LICENSE.


© 2023 Max Milton

0.8.0-next.8

4 months ago

0.8.0-next.7

4 months ago

0.8.0-next.6

4 months ago

0.8.0-next.5

5 months ago

0.8.0-next.4

9 months ago

0.8.0-next.2

10 months ago

0.8.0-next.3

10 months ago

0.8.0-next.0

10 months ago

0.8.0-next.1

10 months ago

0.7.2

1 year ago

0.7.1

1 year ago

0.7.0

1 year ago

0.6.2

2 years ago

0.5.0

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.0.12

3 years ago

0.0.13

2 years ago

0.1.0

2 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago