Skip to content
Snippets Groups Projects
Unverified Commit c08b583e authored by Joachim Viide's avatar Joachim Viide Committed by GitHub
Browse files

Merge pull request #141 from jviide/prep-v3

Prepare README.md and package.json files for v3 release
parents edab3dc8 1aa860b4
No related branches found
Tags 3.0.0
No related merge requests found
......@@ -75,7 +75,7 @@ If you're using Preact or React, we've included off-the-shelf bindings to make y
They also have the added benefit of sharing a template cache across all modules.
```js
import { render } from 'preact';
import { render } from 'preact';
import { html } from 'htm/preact';
render(html`<a href="/">Hello!</a>`, document.body);
```
......@@ -83,7 +83,7 @@ render(html`<a href="/">Hello!</a>`, document.body);
Similarly, for React:
```js
import ReactDOM from 'react-dom';
import ReactDOM from 'react-dom';
import { html } from 'htm/react';
ReactDOM.render(html`<a href="/">Hello!</a>`, document.body);
```
......@@ -264,9 +264,9 @@ console.log(html`
The original goal for `htm` was to create a wrapper around Preact that felt natural for use untranspiled in the browser. I wanted to use Virtual DOM, but I wanted to eschew build tooling and use ES Modules directly.
This meant giving up JSX, and the closest alternative was [Tagged Templates]. So, I wrote this library to patch up the differences between the two as much as possible. As it turns out, the technique is framework-agnostic, so it should work great with most Virtual DOM libraries.
This meant giving up JSX, and the closest alternative was [Tagged Templates]. So, I wrote this library to patch up the differences between the two as much as possible. The technique turns out to be framework-agnostic, so it should work great with any library or renderer that works with JSX.
As of 2.1.0, `htm` is stable, well-tested and ready for production use.
`htm` is stable, fast, well-tested and ready for production use.
[Tagged Templates]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Tagged_templates
[lit-html]: https://github.com/Polymer/lit-html
......
{
"name": "htm",
"version": "2.2.1",
"version": "3.0.0",
"description": "The Tagged Template syntax for Virtual DOM. Only browser-compatible syntax.",
"main": "dist/htm.js",
"umd:main": "dist/htm.umd.js",
......
{
"name": "babel-plugin-htm",
"version": "2.2.0",
"version": "3.0.0",
"description": "Babel plugin to compile htm's Tagged Template syntax to hyperscript or inline VNodes.",
"main": "dist/babel-plugin-htm.js",
"module": "dist/babel-plugin-htm.mjs",
......@@ -33,7 +33,7 @@
"license": "Apache-2.0",
"homepage": "https://github.com/developit/htm/tree/master/packages/babel-plugin-htm",
"dependencies": {
"htm": "^2.2.0"
"htm": "^3.0.0"
},
"devDependencies": {
"microbundle": "^0.10.1"
......
{
"name": "babel-plugin-transform-jsx-to-htm",
"version": "1.1.0",
"version": "2.0.0",
"description": "Babel plugin to compile JSX to Tagged Templates.",
"main": "dist/babel-plugin-transform-jsx-to-htm.js",
"scripts": {
......@@ -32,7 +32,7 @@
"homepage": "https://github.com/developit/htm/tree/master/packages/babel-plugin-transform-jsx-to-htm",
"dependencies": {
"@babel/plugin-syntax-jsx": "^7.2.0",
"htm": "^2.2.0"
"htm": "^3.0.0"
},
"devDependencies": {
"microbundle": "^0.10.1"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment