Skip to content

Commit 1dba010

Browse files
committed
Add "exports" to package.json, use it to limit what's exported, leave "main" for compatability.
1 parent 51cec76 commit 1dba010

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

helpers/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"name": "markdownlint-rule-helpers",
33
"version": "0.17.0",
44
"description": "A collection of markdownlint helper functions for custom rules",
5-
"main": "helpers.js",
5+
"main": "./helpers.js",
6+
"exports": "./helpers.js",
67
"author": "David Anson (https://dlaa.me/)",
78
"license": "MIT",
89
"homepage": "https://github.com/DavidAnson/markdownlint",

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33
"version": "0.26.0",
44
"description": "A Node.js style checker and lint tool for Markdown/CommonMark files.",
55
"type": "commonjs",
6-
"main": "lib/markdownlint.js",
7-
"types": "lib/markdownlint.d.ts",
6+
"main": "./lib/markdownlint.js",
7+
"exports": {
8+
".": "./lib/markdownlint.js",
9+
"./helpers": "./helpers/helpers.js"
10+
},
11+
"types": "./lib/markdownlint.d.ts",
812
"author": "David Anson (https://dlaa.me/)",
913
"license": "MIT",
1014
"homepage": "https://github.com/DavidAnson/markdownlint",

0 commit comments

Comments
 (0)