Skip to content

Commit 1b57e3d

Browse files
committed
Change to use exports
1 parent de6c1e6 commit 1b57e3d

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
],
3030
"sideEffects": false,
3131
"type": "module",
32-
"main": "index.js",
33-
"types": "index.d.ts",
32+
"exports": "./index.js",
3433
"files": [
3534
"lib/",
3635
"index.d.ts",

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ Which you can also put inline: {1+1}.
110110

111111
```js
112112
import fs from 'node:fs/promises'
113-
import {fromMarkdown} from 'mdast-util-from-markdown'
114-
import {toMarkdown} from 'mdast-util-to-markdown'
115113
import {mdxjs} from 'micromark-extension-mdxjs'
114+
import {fromMarkdown} from 'mdast-util-from-markdown'
116115
import {mdxFromMarkdown, mdxToMarkdown} from 'mdast-util-mdx'
116+
import {toMarkdown} from 'mdast-util-to-markdown'
117117

118118
const doc = await fs.readFile('example.mdx')
119119

test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import assert from 'node:assert/strict'
22
import test from 'node:test'
33
import {mdxjs} from 'micromark-extension-mdxjs'
44
import {fromMarkdown} from 'mdast-util-from-markdown'
5+
import {mdxFromMarkdown, mdxToMarkdown} from 'mdast-util-mdx'
56
import {toMarkdown} from 'mdast-util-to-markdown'
6-
import {mdxFromMarkdown, mdxToMarkdown} from './index.js'
77

88
test('core', async function (t) {
99
await t.test('should expose the public api', async function () {
10-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
10+
assert.deepEqual(Object.keys(await import('mdast-util-mdx')).sort(), [
1111
'mdxFromMarkdown',
1212
'mdxToMarkdown'
1313
])

0 commit comments

Comments
 (0)