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 23, 2023
1 parent 6e8eeee commit f8b14aa
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
import {findAndReplace} from 'mdast-util-find-and-replace'
import {toString} from 'mdast-util-to-string'
import {visit} from 'unist-util-visit'
import {getRepoFromPackage} from './get-repo-from-package.js'
import {getRepoFromPackage} from '#get-repo-from-package'

/** @type {Readonly<Options>} */
const emptyOptions = {}
Expand Down
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,12 @@
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"browser": {
"./lib/get-repo-from-package.js": "./lib/get-repo-from-package.browser.js"
},
"react-native": {
"./lib/get-repo-from-package.js": "./lib/get-repo-from-package.browser.js"
"exports": "./index.js",
"imports": {
"#get-repo-from-package": {
"node": "./lib/get-repo-from-package.node.js",
"default": "./lib/get-repo-from-package.default.js"
}
},
"files": [
"lib/",
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ npm install remark-github
In Deno with [`esm.sh`][esmsh]:

```js
import remarkGithub from 'https://esm.sh/remark-github@11'
import remarkGithub, {defaultBuildUrl} from 'https://esm.sh/remark-github@11'
```

In browsers with [`esm.sh`][esmsh]:

```html
<script type="module">
import remarkGithub from 'https://esm.sh/remark-github@11?bundle'
import remarkGithub, {defaultBuildUrl} from 'https://esm.sh/remark-github@11?bundle'
</script>
```

Expand Down

0 comments on commit f8b14aa

Please sign in to comment.