preact-jsx-runtime
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -0,1 +1,7 @@ | ||
## 1.2.0 (2020-09-12) | ||
### Features | ||
- Add [ES modules](https://nodejs.org/api/esm.html) entrypoints. | ||
## 1.1.0 (2020-08-16) | ||
@@ -2,0 +8,0 @@ |
@@ -1,2 +0,3 @@ | ||
var preact = require('preact'); | ||
import { createElement } from 'preact'; | ||
export { Fragment } from 'preact'; | ||
@@ -13,3 +14,3 @@ /** @typedef {import('preact').ComponentType} ComponentType */ | ||
*/ | ||
function jsx(type, config, maybeKey) { | ||
export function jsx(type, config, maybeKey) { | ||
/** @type {Props} */ | ||
@@ -35,9 +36,5 @@ var props; | ||
return preact.createElement(type, props); | ||
return createElement(type, props); | ||
} | ||
module.exports = { | ||
Fragment: preact.Fragment, | ||
jsx: jsx, | ||
jsxs: jsx, | ||
}; | ||
export { jsx as jsxs }; |
{ | ||
"name": "preact-jsx-runtime", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Preact JSX runtime definition for use with automatic JSX import", | ||
"main": "jsx-runtime.js", | ||
"main": "jsx-runtime", | ||
"module": "jsx-runtime.js", | ||
"type": "module", | ||
"exports": { | ||
"./jsx-runtime": { | ||
"import": "./jsx-runtime.js", | ||
"require": "./jsx-runtime" | ||
} | ||
}, | ||
"sideEffects": false, | ||
@@ -14,2 +22,4 @@ "keywords": [ | ||
"scripts": { | ||
"build": "babel --plugins @babel/transform-modules-commonjs jsx-runtime.js -o jsx-runtime", | ||
"prepublishOnly": "npm run build", | ||
"test:lint": "eslint jsx-runtime.js test", | ||
@@ -35,2 +45,3 @@ "test:typescript": "npx tsc", | ||
"files": [ | ||
"jsx-runtime", | ||
"jsx-runtime.js" | ||
@@ -42,10 +53,11 @@ ], | ||
"devDependencies": { | ||
"@babel/core": "^7.11.1", | ||
"@babel/preset-env": "^7.11.0", | ||
"@babel/cli": "^7.11.6", | ||
"@babel/core": "^7.11.6", | ||
"@babel/plugin-transform-modules-commonjs": "^7.10.4", | ||
"@babel/preset-react": "^7.10.4", | ||
"chai": "^4.2.0", | ||
"eslint": "^7.6.0", | ||
"eslint": "^7.9.0", | ||
"eslint-config-prettier": "^6.11.0", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"mocha": "^8.1.1", | ||
"mocha": "^8.1.3", | ||
"npm-run-all": "^4.1.5", | ||
@@ -55,5 +67,5 @@ "preact": "^10.4.7", | ||
"preact-render-to-string": "^5.1.10", | ||
"prettier": "^2.0.5", | ||
"typescript": "^3.9.7" | ||
"prettier": "^2.1.1", | ||
"typescript": "^4.0.2" | ||
} | ||
} |
7469
6
Yes
15
31