@small-tech/vhtml
v1.0.0
Published
Fork of vhtml optimised for use in Kitten.
Downloads
2
Maintainers
Readme
vhtml
Fork of vhtml optimised for Kitten
Fork of vhtml by Jason Miller optimised 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.
- Removed some optimisations (minification, etc.) that don’t make sense for Kitten’s use case.
- Migrated tests to tape.
- Made the module ESM-only to keep things simple.
- New npm package name.
Installation
Via npm:
npm install @small-tech/vhtml
Usage
See vhtml
License
MIT (as per the original module)