preact-render-to-string
Version:
Render JSX to an HTML string, with support for Preact components.
128 lines (127 loc) • 3.29 kB
JSON
{
"name": "preact-render-to-string",
"amdName": "preactRenderToString",
"version": "5.1.15",
"description": "Render JSX to an HTML string, with support for Preact components.",
"main": "dist/index.js",
"umd:main": "dist/index.js",
"module": "dist/index.module.js",
"jsnext:main": "dist/index.module.js",
"exports": {
".": {
"import": "./dist/index.mjs",
"browser": "./dist/index.module.js",
"require": "./dist/index.js"
},
"./jsx": {
"import": "./dist/jsx.mjs",
"browser": "./dist/jsx.module.js",
"require": "./dist/jsx.js"
},
"./package.json": "./package.json",
"./": "./"
},
"scripts": {
"bench": "node -r @babel/register benchmarks index.js",
"build": "npm run -s transpile && npm run -s transpile:jsx && npm run -s copy-typescript-definition",
"postbuild": "node ./config/node-13-exports.js && node ./config/node-commonjs.js",
"transpile": "microbundle src/index.js -f es,umd --target web --external preact",
"transpile:jsx": "microbundle src/jsx.js -o dist/jsx.js --target web --external none && microbundle dist/jsx.js -o dist/jsx.js -f cjs",
"copy-typescript-definition": "copyfiles -f src/*.d.ts dist",
"test": "eslint src test && tsc && npm run test:mocha",
"test:mocha": "mocha -r @babel/register test/**/*.js",
"format": "prettier src/**/*.{d.ts,js} test/**/*.js --write",
"prepublishOnly": "npm run build",
"release": "npm run build && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"
},
"keywords": [
"preact",
"render",
"universal",
"isomorphic"
],
"files": [
"src",
"dist",
"jsx.js",
"typings.json"
],
"eslintConfig": {
"extends": "developit",
"rules": {
"react/prefer-stateless-function": 0,
"react/jsx-no-bind": 0,
"react/no-danger": 0,
"jest/valid-expect": 0,
"new-cap": 0,
"curly": "off",
"brace-style": "off",
"indent": "off"
},
"settings": {
"react": {
"version": "16.8"
}
}
},
"babel": {
"presets": [
"@babel/preset-env"
],
"plugins": [
[
"@babel/plugin-transform-react-jsx",
{
"pragma": "h"
}
]
]
},
"author": "Jason Miller <jason@developit.ca>",
"license": "MIT",
"typings": "src/index.d.ts",
"repository": "developit/preact-render-to-string",
"bugs": "https://github.com/developit/preact-render-to-string/issues",
"homepage": "https://github.com/developit/preact-render-to-string",
"peerDependencies": {
"preact": ">=10"
},
"devDependencies": {
"@babel/plugin-transform-react-jsx": "^7.12.12",
"@babel/preset-env": "^7.12.11",
"@babel/register": "^7.12.10",
"benchmarkjs-pretty": "^2.0.1",
"chai": "^4.2.0",
"copyfiles": "^2.4.1",
"eslint": "^7.16.0",
"eslint-config-developit": "^1.2.0",
"husky": "^4.3.6",
"lint-staged": "^10.5.3",
"microbundle": "^0.13.0",
"mocha": "^8.2.1",
"preact": "^10.5.7",
"prettier": "^2.2.1",
"sinon": "^9.2.2",
"sinon-chai": "^3.5.0",
"typescript": "^4.1.3"
},
"dependencies": {
"pretty-format": "^3.8.0"
},
"prettier": {
"singleQuote": true,
"trailingComma": "none",
"useTabs": true,
"tabWidth": 2
},
"lint-staged": {
"**/*.{js,jsx,ts,tsx,yml}": [
"prettier --write"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
}
}