|
6 | 6 | "umd:main": "dist/htm.umd.js", |
7 | 7 | "module": "dist/htm.module.js", |
8 | 8 | "types": "dist/htm.d.ts", |
| 9 | + "exports": { |
| 10 | + ".": { |
| 11 | + "import": "./dist/htm.mjs", |
| 12 | + "require": "./dist/htm.js", |
| 13 | + "browser": "./dist/htm.module.js", |
| 14 | + "umd": "./dist/htm.umd.js" |
| 15 | + }, |
| 16 | + "./": "./", |
| 17 | + "./preact": { |
| 18 | + "import": "./preact/index.mjs", |
| 19 | + "require": "./preact/index.js", |
| 20 | + "browser": "./preact/index.module.js", |
| 21 | + "umd": "./preact/index.umd.js" |
| 22 | + }, |
| 23 | + "./preact/standalone": { |
| 24 | + "import": "./preact/standalone.mjs", |
| 25 | + "require": "./preact/standalone.js", |
| 26 | + "browser": "./preact/standalone.module.js", |
| 27 | + "umd": "./preact/standalone.umd.js" |
| 28 | + }, |
| 29 | + "./react": { |
| 30 | + "import": "./react/index.mjs", |
| 31 | + "require": "./react/index.js", |
| 32 | + "browser": "./react/index.module.js", |
| 33 | + "umd": "./react/index.umd.js" |
| 34 | + }, |
| 35 | + "./mini": { |
| 36 | + "import": "./mini/index.mjs", |
| 37 | + "require": "./mini/index.js", |
| 38 | + "browser": "./mini/index.module.js", |
| 39 | + "umd": "./mini/index.umd.js" |
| 40 | + } |
| 41 | + }, |
9 | 42 | "scripts": { |
10 | 43 | "build": "npm run -s build:main && npm run -s build:mini && npm run -s build:preact && npm run -s build:react && npm run -s build:babel && npm run -s build:babel-transform-jsx && npm run -s build:mjsalias", |
11 | 44 | "build:main": "microbundle src/index.mjs -f es,umd --no-sourcemap --target web && microbundle src/cjs.mjs -f iife --no-sourcemap --target web && cp src/index.d.ts dist/htm.d.ts", |
|
15 | 48 | "build:babel": "cd packages/babel-plugin-htm && npm run build", |
16 | 49 | "build:babel-transform-jsx": "cd packages/babel-plugin-transform-jsx-to-htm && npm run build", |
17 | 50 | "build:mjsalias": "cp dist/htm.module.js dist/htm.mjs && cp mini/index.module.js mini/index.mjs && cp preact/index.module.js preact/index.mjs && cp preact/standalone.module.js preact/standalone.mjs && cp react/index.module.js react/index.mjs", |
18 | | - "test": "eslint src/**/*.mjs test/**/*.mjs && npm run build && jest test", |
| 51 | + "test": "eslint src/**/*.mjs test/**/*.mjs --ignore-path .gitignore && npm run build && jest test", |
19 | 52 | "test:perf": "v8 test/__perftest.mjs", |
| 53 | + "test:dist": "npm pack && mv htm*.tgz test/fixtures/esm/htm.tgz && cd test/fixtures/esm && npm install && node index.js", |
20 | 54 | "release": "npm t && git commit -am \"$npm_package_version\" && git tag $npm_package_version && git push && git push --tags && npm publish" |
21 | 55 | }, |
22 | 56 | "files": [ |
|
0 commit comments