Skip to content

Commit

Permalink
Change to use exports
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 25, 2023
1 parent 8f73640 commit 17079b0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
8 changes: 5 additions & 3 deletions packages/rehype-cli/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ import {args} from 'unified-args'
/** @type {Pack} */
const proc = JSON.parse(
String(
// To do: this will break when we add export maps.
await fs.readFile(new URL(resolve('rehype/package.json', import.meta.url)))
await fs.readFile(
new URL('package.json', resolve('rehype', import.meta.url))
)
)
)

/** @type {Pack} */
const cli = JSON.parse(
String(await fs.readFile(new URL(resolve('./package.json', import.meta.url))))
String(await fs.readFile(new URL('package.json', import.meta.url)))
)

args({
Expand Down
2 changes: 1 addition & 1 deletion packages/rehype-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"Titus Wormer <[email protected]> (https://wooorm.com)"
],
"type": "module",
"main": "cli.js",
"exports": [],
"bin": {
"rehype": "cli.js"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/rehype-parse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions packages/rehype-stringify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"exports": "./index.js",
"files": [
"lib/",
"index.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions packages/rehype/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"exports": "./index.js",
"files": [
"index.d.ts",
"index.js"
Expand Down

0 comments on commit 17079b0

Please sign in to comment.