Skip to content

Commit

Permalink
chore: esm docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Oct 4, 2023
1 parent 8835042 commit 84617a1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 81 deletions.
73 changes: 0 additions & 73 deletions docs/ES2022.md

This file was deleted.

11 changes: 5 additions & 6 deletions docs/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: ESM
---

Version [3.0.0 of `@oclif/core`](https://github.com/oclif/core/tree/3.0.0-beta.12) officially supports ESM plugin development and CJS/ESM interoperability, meaning that you can have a root plugin written with CJS and your bundled plugins written in ESM or vice versa.
Version 3.0.0 of `@oclif/core` officially supports ESM plugin development and CJS/ESM interoperability, meaning that you can have a root plugin written with CJS and your bundled plugins written in ESM or vice versa.

- [Interoperability Overview](#interoperability-overview)
- [ESM Root plugin](#esm-root-plugin)
Expand Down Expand Up @@ -68,7 +68,7 @@ Rename `bin/dev` to `bin/dev.js` and replace the existing code with the followin
```js
#!/usr/bin/env node
// eslint-disable-next-line node/shebang
void (async () => {
(async () => {
const oclif = await import('@oclif/core')
await oclif.execute({development: true, dir: import.meta.url})
})()
Expand All @@ -79,7 +79,7 @@ This leverages oclif's `execute` function which handles all the development setu
```js
#!/usr/bin/env node
// eslint-disable-next-line node/shebang
void (async () => {
(async () => {
const oclif = await import('@oclif/core')
oclif.settings.performanceEnabled = true
await oclif.execute({type: 'esm', development: true, dir: import.meta.url})
Expand All @@ -92,7 +92,7 @@ Rename `bin/run` to `bin/run.js` and replace the existing code with the followin
```js
#!/usr/bin/env node
void (async () => {
(async () => {
const oclif = await import('@oclif/core')
await oclif.execute({dir: import.meta.url})
})()
Expand Down Expand Up @@ -136,8 +136,7 @@ to
},
```
You may have references to the bin scripts in your `.vscode/launch.json`. You'll need to update these as well.
You may have references to the bin scripts in your `.vscode/launch.json` or in the `scripts` of your `package.json`. You'll need to update these as well.
### Update mocharc settings
Expand Down
3 changes: 1 addition & 2 deletions website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
"flexible_taxonomy",
"global_flags",
"single_command_cli",
"esm",
"ES2022"
"esm"
],
"Also See": [
"examples",
Expand Down

0 comments on commit 84617a1

Please sign in to comment.