1 | {
|
2 | "name": "preact-render-to-string",
|
3 | "amdName": "preactRenderToString",
|
4 | "version": "5.2.2",
|
5 | "description": "Render JSX to an HTML string, with support for Preact components.",
|
6 | "main": "dist/index.js",
|
7 | "umd:main": "dist/index.js",
|
8 | "module": "dist/index.module.js",
|
9 | "jsnext:main": "dist/index.module.js",
|
10 | "types": "src/index.d.ts",
|
11 | "exports": {
|
12 | ".": {
|
13 | "types": "./src/index.d.ts",
|
14 | "import": "./dist/index.mjs",
|
15 | "browser": "./dist/index.module.js",
|
16 | "require": "./dist/index.js"
|
17 | },
|
18 | "./jsx": {
|
19 | "types": "./jsx.d.ts",
|
20 | "import": "./dist/jsx.mjs",
|
21 | "browser": "./dist/jsx.module.js",
|
22 | "require": "./dist/jsx.js"
|
23 | },
|
24 | "./package.json": "./package.json"
|
25 | },
|
26 | "scripts": {
|
27 | "bench": "BABEL_ENV=test node -r @babel/register benchmarks index.js",
|
28 | "bench:v8": "BABEL_ENV=test microbundle benchmarks/index.js -f modern --alias benchmarkjs-pretty=benchmarks/lib/benchmark-lite.js --external none --target node --no-compress --no-sourcemap --raw -o benchmarks/.v8.js && v8 --module benchmarks/.v8.modern.js",
|
29 | "build": "npm run -s transpile && npm run -s transpile:jsx && npm run -s copy-typescript-definition",
|
30 | "postbuild": "node ./config/node-13-exports.js && node ./config/node-commonjs.js",
|
31 | "transpile": "microbundle src/index.js -f es,umd --target web --external preact",
|
32 | "transpile:jsx": "microbundle src/jsx.js -o dist/jsx.js --target web --external preact && microbundle dist/jsx.js -o dist/jsx.js -f cjs --external preact",
|
33 | "copy-typescript-definition": "copyfiles -f src/*.d.ts dist",
|
34 | "test": "eslint src test && tsc && npm run test:mocha && npm run bench",
|
35 | "test:mocha": "BABEL_ENV=test mocha -r @babel/register -r test/setup.js test/**/[!compat]*.test.js && npm run test:mocha:compat",
|
36 | "test:mocha:compat": "BABEL_ENV=test mocha -r @babel/register -r test/setup.js test/compat.test.js",
|
37 | "format": "prettier src/**/*.{d.ts,js} test/**/*.js --write",
|
38 | "prepublishOnly": "npm run build",
|
39 | "release": "npm run build && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"
|
40 | },
|
41 | "keywords": [
|
42 | "preact",
|
43 | "render",
|
44 | "universal",
|
45 | "isomorphic"
|
46 | ],
|
47 | "files": [
|
48 | "src",
|
49 | "dist",
|
50 | "jsx.js",
|
51 | "typings.json"
|
52 | ],
|
53 | "eslintConfig": {
|
54 | "extends": "developit",
|
55 | "rules": {
|
56 | "react/prefer-stateless-function": 0,
|
57 | "react/jsx-no-bind": 0,
|
58 | "react/no-danger": 0,
|
59 | "jest/valid-expect": 0,
|
60 | "new-cap": 0,
|
61 | "curly": "off",
|
62 | "brace-style": "off",
|
63 | "indent": "off"
|
64 | },
|
65 | "settings": {
|
66 | "react": {
|
67 | "version": "16.8"
|
68 | }
|
69 | }
|
70 | },
|
71 | "babel": {
|
72 | "env": {
|
73 | "test": {
|
74 | "presets": [
|
75 | [
|
76 | "@babel/preset-env",
|
77 | {
|
78 | "targets": {
|
79 | "node": true
|
80 | }
|
81 | }
|
82 | ]
|
83 | ],
|
84 | "plugins": [
|
85 | [
|
86 | "@babel/plugin-transform-react-jsx",
|
87 | {
|
88 | "pragma": "h"
|
89 | }
|
90 | ]
|
91 | ]
|
92 | }
|
93 | }
|
94 | },
|
95 | "author": "Jason Miller <jason@developit.ca>",
|
96 | "license": "MIT",
|
97 | "repository": "developit/preact-render-to-string",
|
98 | "bugs": "https://github.com/developit/preact-render-to-string/issues",
|
99 | "homepage": "https://github.com/developit/preact-render-to-string",
|
100 | "peerDependencies": {
|
101 | "preact": ">=10"
|
102 | },
|
103 | "devDependencies": {
|
104 | "@babel/plugin-transform-react-jsx": "^7.12.12",
|
105 | "@babel/preset-env": "^7.12.11",
|
106 | "@babel/register": "^7.12.10",
|
107 | "@changesets/cli": "^2.18.0",
|
108 | "@changesets/changelog-github": "^0.4.1",
|
109 | "benchmarkjs-pretty": "^2.0.1",
|
110 | "chai": "^4.2.0",
|
111 | "copyfiles": "^2.4.1",
|
112 | "eslint": "^7.16.0",
|
113 | "eslint-config-developit": "^1.2.0",
|
114 | "husky": "^4.3.6",
|
115 | "lint-staged": "^10.5.3",
|
116 | "microbundle": "^0.13.0",
|
117 | "mocha": "^8.2.1",
|
118 | "preact": "^10.5.7",
|
119 | "prettier": "^2.2.1",
|
120 | "sinon": "^9.2.2",
|
121 | "sinon-chai": "^3.5.0",
|
122 | "typescript": "^4.1.3"
|
123 | },
|
124 | "dependencies": {
|
125 | "pretty-format": "^3.8.0"
|
126 | },
|
127 | "prettier": {
|
128 | "singleQuote": true,
|
129 | "trailingComma": "none",
|
130 | "useTabs": true,
|
131 | "tabWidth": 2
|
132 | },
|
133 | "lint-staged": {
|
134 | "**/*.{js,jsx,ts,tsx,yml}": [
|
135 | "prettier --write"
|
136 | ]
|
137 | },
|
138 | "husky": {
|
139 | "hooks": {
|
140 | "pre-commit": "lint-staged"
|
141 | }
|
142 | }
|
143 | }
|