Add deno, browsers to install

This commit is contained in:
Titus Wormer 2021-10-24 09:26:07 +02:00
parent db8f6428ae
commit f392cf580b
No known key found for this signature in database
GPG key ID: E6E581152ED04E2E

View file

@ -53,15 +53,27 @@ and static site generators.
## Install ## Install
This package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c): 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. In Node.js (12.20+, 14.14+, 16.0+), install with [npm][]:
[npm][]:
```sh ```sh
npm install remark-directive 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 ## Use
Say we have the following file, `example.md`: Say we have the following file, `example.md`:
@ -329,6 +341,8 @@ abide by its terms.
[npm]: https://docs.npmjs.com/cli/install [npm]: https://docs.npmjs.com/cli/install
[skypack]: https://www.skypack.dev
[health]: https://github.com/remarkjs/.github [health]: https://github.com/remarkjs/.github
[contributing]: https://github.com/remarkjs/.github/blob/HEAD/contributing.md [contributing]: https://github.com/remarkjs/.github/blob/HEAD/contributing.md