Fork of vhtml by Jason Miller optimised for HTML instead of JSX (mainly for use by Kitten).
Find a file
2023-03-03 16:46:31 +00:00
.gitignore WIP: Fork 2023-03-01 19:50:01 +00:00
CHANGELOG.md Update changelog in preparation for next release 2023-03-03 11:35:40 +00:00
index.js Add tests for script injection via cache exploit 2023-03-03 16:46:31 +00:00
LICENSE WIP: Fork 2023-03-01 19:50:01 +00:00
package-lock.json WIP: Fork 2023-03-01 19:50:01 +00:00
package.json WIP: Fork 2023-03-01 19:50:01 +00:00
README.md Improve list of differences and fork description 2023-03-02 14:02:24 +00:00
tests.js Add tests for script injection via cache exploit 2023-03-03 16:46:31 +00:00

vhtml

Fork of vhtml optimised for Kitten

Fork of vhtml by Jason Miller optimised for HTML instead of JSX (mainly for use by Kitten).

If you’re wondering which module to use, you probably should use Jason’s original one.

What’s different

The differences are mostly due to Kitten’s tagged templates targetting HTML rather than JSX.

  • Boolean HTML attributes are output as just the name of the attribute, not attribute="true" (e.g.,h('main', {hidden: true}) is rendered as <div hidden></div>, not <div hidden="true"></div>)

  • <style>…</style> tags are not escaped, so you can use quotation marks in them.

Other differences:

  • Moved repository to Codeberg.
  • Changed npm package name to @small-tech/vhtml
  • Reset version to 1.0.0 for new fork.
  • Made the module ESM-only to keep things simple.
  • Source is now in the main directory, in a single file.
  • Tests are now in tape with tap-monkey reporter instead of mocha and chai.
  • Tests now use xhtm instead of JSX.
  • Tests are now in the main directory, in a single file.
  • Removed 18 development dependencies including babel, rollup, and uglify.

For full list of changes, please see the changelog.

Installation

Via npm:

npm install @small-tech/vhtml

Usage

See vhtml

License

MIT (as per the original module)