Skip to content

Commit 890ddb3

Browse files
Merge pull request #1059 from beeequeue/exports
2 parents d01523b + c1e1f8d commit 890ddb3

File tree

3 files changed

+84
-7
lines changed

3 files changed

+84
-7
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ jobs:
2020

2121
- name: Build artifacts
2222
run: npm run build
23+
24+
- name: Run Publint
25+
run: npm run lint:publint

package-lock.json

Lines changed: 66 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,22 @@
77
"module": "./esm/index.mjs",
88
"exports": {
99
".": {
10-
"import": "./esm/index.mjs",
11-
"require": "./lib/index.js"
10+
"browser": {
11+
"require": "./lib/client/html-to-dom.js",
12+
"default": "./esm/client/html-to-dom.mjs"
13+
},
14+
"default": {
15+
"require": "./lib/index.js",
16+
"default": "./esm/index.mjs"
17+
}
1218
},
1319
"./lib/client/*": {
14-
"import": "./esm/client/*.mjs",
15-
"require": "./lib/client/*.js"
20+
"require": "./lib/client/*.js",
21+
"default": "./esm/client/*.mjs"
1622
},
1723
"./lib/server/*": {
18-
"import": "./esm/server/*.mjs",
19-
"require": "./lib/server/*.js"
24+
"require": "./lib/server/*.js",
25+
"default": "./esm/server/*.mjs"
2026
},
2127
"./package.json": "./package.json"
2228
},
@@ -28,9 +34,10 @@
2834
"clean": "rm -rf .nyc_output coverage dist lib",
2935
"lint": "eslint .",
3036
"lint:fix": "npm run lint -- --fix",
37+
"lint:publint": "publint",
3138
"lint:tsc": "tsc --noEmit",
3239
"prepare": "husky",
33-
"prepublishOnly": "run-s lint lint:tsc test:server clean build",
40+
"prepublishOnly": "run-s lint lint:tsc test:server clean build lint:publint",
3441
"size-limit": "size-limit",
3542
"test": "run-s test:server test:client",
3643
"test:client": "npm run test:client:watch -- --single-run",
@@ -95,6 +102,7 @@
95102
"npm-run-all": "4.1.5",
96103
"nyc": "17.1.0",
97104
"prettier": "3.5.3",
105+
"publint": "0.3.12",
98106
"rollup": "4.40.2",
99107
"size-limit": "11.2.0",
100108
"ts-node": "10.9.2",

0 commit comments

Comments
 (0)