Skip to content

Commit

Permalink
Add "exports" to package.json, use it to limit what's exported, leave…
Browse files Browse the repository at this point in the history
… "main" for compatability.
  • Loading branch information
DavidAnson committed Jul 5, 2022
1 parent 51cec76 commit 1dba010
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "markdownlint-rule-helpers",
"version": "0.17.0",
"description": "A collection of markdownlint helper functions for custom rules",
"main": "helpers.js",
"main": "./helpers.js",
"exports": "./helpers.js",
"author": "David Anson (https://dlaa.me/)",
"license": "MIT",
"homepage": "https://github.com/DavidAnson/markdownlint",
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
"version": "0.26.0",
"description": "A Node.js style checker and lint tool for Markdown/CommonMark files.",
"type": "commonjs",
"main": "lib/markdownlint.js",
"types": "lib/markdownlint.d.ts",
"main": "./lib/markdownlint.js",
"exports": {
".": "./lib/markdownlint.js",
"./helpers": "./helpers/helpers.js"
},
"types": "./lib/markdownlint.d.ts",
"author": "David Anson (https://dlaa.me/)",
"license": "MIT",
"homepage": "https://github.com/DavidAnson/markdownlint",
Expand Down

0 comments on commit 1dba010

Please sign in to comment.