Add deno, browsers to install
This commit is contained in:
parent
db8f6428ae
commit
f392cf580b
1 changed files with 18 additions and 4 deletions
22
readme.md
22
readme.md
|
@ -53,15 +53,27 @@ and static site generators.
|
|||
|
||||
## Install
|
||||
|
||||
This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c):
|
||||
Node 12+ is needed to use it and it must be `import`ed instead of `require`d.
|
||||
|
||||
[npm][]:
|
||||
This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
|
||||
In Node.js (12.20+, 14.14+, 16.0+), install with [npm][]:
|
||||
|
||||
```sh
|
||||
npm install remark-directive
|
||||
```
|
||||
|
||||
In Deno with [Skypack][]:
|
||||
|
||||
```js
|
||||
import remarkDirective from 'https://cdn.skypack.dev/remark-directive@2?dts'
|
||||
```
|
||||
|
||||
In browsers with [Skypack][]:
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import remarkDirective from 'https://cdn.skypack.dev/remark-directive@2?min'
|
||||
</script>
|
||||
```
|
||||
|
||||
## Use
|
||||
|
||||
Say we have the following file, `example.md`:
|
||||
|
@ -329,6 +341,8 @@ abide by its terms.
|
|||
|
||||
[npm]: https://docs.npmjs.com/cli/install
|
||||
|
||||
[skypack]: https://www.skypack.dev
|
||||
|
||||
[health]: https://github.com/remarkjs/.github
|
||||
|
||||
[contributing]: https://github.com/remarkjs/.github/blob/HEAD/contributing.md
|
||||
|
|
Loading…
Add table
Reference in a new issue