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 Sep 12, 2023
1 parent bd8c922 commit a3e6d54
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
8 changes: 5 additions & 3 deletions packages/remark-cli/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,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('remark/package.json', import.meta.url)))
await fs.readFile(
new URL('package.json', resolve('remark', 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/remark-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
],
"type": "module",
"main": "index.js",
"exports": [],
"bin": {
"remark": "cli.js"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/remark-parse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,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/remark-stringify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,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/remark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,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 a3e6d54

Please sign in to comment.