Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Deno instructions to docs #4311

Merged
merged 4 commits into from Dec 23, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/07-tools.md
Expand Up @@ -246,3 +246,22 @@ gulp.task('build', async function () {
});
});
```

### Deno
If you like to run Rollup in you can use [esm.sh](https://esm.sh/) like so:
jespertheend marked this conversation as resolved.
Show resolved Hide resolved
```js
import {rollup} from "https://esm.sh/rollup@2.61.1";

const bundle = await rollup({ //...
```

Alternatively you can install rollup from npm and use the [node compatibility layer](https://deno.land/std@0.110.0/node):
```js
import {createRequire} from "https://deno.land/std@0.110.0/node/module.ts";
const require = createRequire(import.meta.url);
const {rollup} = require("rollup");

const bundle = await rollup({ //...
```

Be sure to run deno with the `--unstable` flag. And don't forget `--allow-read` and `--allow-write` if you plan on using `bundle.write()`.