Comparing version 5.1.3 to 5.1.4
@@ -0,1 +1,7 @@ | ||
# 5.1.4 | ||
- Exports `h` variable as an alias for `createElement` for hyperscript users. | ||
# 5.1.3 | ||
- Fixes an issue with `spellCheck` attribute. | ||
# 5.1.2 | ||
@@ -2,0 +8,0 @@ - Adds support for `spellCheck`. |
@@ -49,3 +49,3 @@ 'use strict'; | ||
} | ||
var DOM$$1 = function (obj) { | ||
var DOM = function (obj) { | ||
for (var _i = 0, _a = keys(obj); _i < _a.length; _i++) { | ||
@@ -208,3 +208,4 @@ var key = _a[_i]; | ||
exports.stopPropagation = stopPropagation; | ||
exports.h = createElement; | ||
exports.createElement = createElement; | ||
exports.DOM = DOM$$1; | ||
exports.DOM = DOM; |
@@ -47,3 +47,3 @@ | ||
} | ||
var DOM$$1 = function (obj) { | ||
var DOM = function (obj) { | ||
for (var _i = 0, _a = keys(obj); _i < _a.length; _i++) { | ||
@@ -203,2 +203,2 @@ var key = _a[_i]; | ||
export { SVGNamespace, preventDefault, stopPropagation, createElement, DOM$$1 as DOM }; | ||
export { SVGNamespace, preventDefault, stopPropagation, createElement as h, createElement, DOM }; |
{ | ||
"name": "jsx-dom", | ||
"version": "5.1.3", | ||
"version": "5.1.4", | ||
"description": "JSX to document.createElement.", | ||
@@ -21,15 +21,15 @@ "main": "index.cjs.js", | ||
"@alexlur/rollup-plugin-typescript": "^1.0.4", | ||
"@types/babel-core": "^6.7.15", | ||
"@types/chai": "^4.0.1", | ||
"@types/jsdom": "^11.0.1", | ||
"@types/mocha": "^2.2.41", | ||
"@types/node": "^8.0.14", | ||
"babel-core": "^6.25.0", | ||
"chai": "^4.1.0", | ||
"@types/babel-core": "^6.25.1", | ||
"@types/chai": "^4.0.4", | ||
"@types/jsdom": "^11.0.2", | ||
"@types/mocha": "^2.2.42", | ||
"@types/node": "^8.0.27", | ||
"babel-core": "^6.26.0", | ||
"chai": "^4.1.2", | ||
"coffeescript": "^2.0.0-beta3", | ||
"jsdom": "^11.1.0", | ||
"mocha": "^3.4.2", | ||
"rollup": "^0.45.2", | ||
"ts-node": "^3.2.1", | ||
"typescript": "^2.4.2" | ||
"jsdom": "^11.2.0", | ||
"mocha": "^3.5.0", | ||
"rollup": "^0.49.2", | ||
"ts-node": "^3.3.0", | ||
"typescript": "^2.5.2" | ||
}, | ||
@@ -36,0 +36,0 @@ "repository": { |
@@ -13,3 +13,3 @@ # jsx-dom | ||
```jsx | ||
import { createElement } from 'jsx-dom'; | ||
import { h } from 'jsx-dom'; | ||
@@ -21,7 +21,9 @@ document.body.appendChild( | ||
You need to tell your transpiler to use the name `createElement`. If you prefer not to, skip to the next section for instructions. For Babel users, specify within your `.babelrc`: | ||
**Note:** If you are coming from a previous version and are using `createElement` instead of `h`, no change is necessary as both of them will continue to work. | ||
You need to tell your transpiler to use the name `h`. If you prefer not to, skip to the next section for instructions. For Babel users, specify within your `.babelrc`: | ||
```js | ||
"plugins": [ | ||
["transform-react-jsx", {"pragma": "createElement"}] | ||
["transform-react-jsx", {"pragma": "h"}] | ||
] | ||
@@ -35,3 +37,3 @@ ``` | ||
"jsx": "react", | ||
"jsxFactory": "createElement", | ||
"jsxFactory": "h", | ||
``` | ||
@@ -88,5 +90,5 @@ | ||
// Use 'jsx-dom/svg'; | ||
import { createElement } from 'jsx-dom/svg'; | ||
import { h } from 'jsx-dom/svg'; | ||
// Or if you prefer Common JS | ||
const { createElement } = require('jsx-dom/svg.cjs'); | ||
const { h } = require('jsx-dom/svg.cjs'); | ||
@@ -111,3 +113,3 @@ document.body.appendChild( | ||
```jsx | ||
import { createElement, SVGNamespace } from 'jsx-dom'; | ||
import { h, SVGNamespace } from 'jsx-dom'; | ||
@@ -114,0 +116,0 @@ <a namespaceURI={SVGNamespace}>I am an SVG element!</a> |
@@ -49,3 +49,3 @@ 'use strict'; | ||
} | ||
var DOM$$1 = function (obj) { | ||
var DOM = function (obj) { | ||
for (var _i = 0, _a = keys(obj); _i < _a.length; _i++) { | ||
@@ -209,4 +209,5 @@ var key = _a[_i]; | ||
stopPropagation: stopPropagation, | ||
h: createElement$1, | ||
createElement: createElement$1, | ||
DOM: DOM$$1 | ||
DOM: DOM | ||
}); | ||
@@ -282,5 +283,5 @@ | ||
exports.createElement = createElement; | ||
exports.DOM = DOM$$1; | ||
exports.DOM = DOM; | ||
exports.SVGNamespace = SVGNamespace; | ||
exports.stopPropagation = stopPropagation; | ||
exports.preventDefault = preventDefault; |
@@ -47,3 +47,3 @@ | ||
} | ||
var DOM$$1 = function (obj) { | ||
var DOM = function (obj) { | ||
for (var _i = 0, _a = keys(obj); _i < _a.length; _i++) { | ||
@@ -207,4 +207,5 @@ var key = _a[_i]; | ||
stopPropagation: stopPropagation, | ||
h: createElement$1, | ||
createElement: createElement$1, | ||
DOM: DOM$$1 | ||
DOM: DOM | ||
}); | ||
@@ -279,2 +280,2 @@ | ||
export { createElement, DOM$$1 as DOM, SVGNamespace, stopPropagation, preventDefault }; | ||
export { createElement, DOM, SVGNamespace, stopPropagation, preventDefault }; |
Sorry, the diff of this file is too big to display
182866
3224
123