Skip to content

Commit

Permalink
chore: simplify ESM execute example (#942)
Browse files Browse the repository at this point in the history
* chore: simplify ESM `execute` example

* Fix import issues
  • Loading branch information
mon-jai authored Feb 12, 2024
1 parent 0b5d809 commit 2f1c119
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,17 @@ import {settings} from './settings'
* @example For ESM dev.js
* ```
* #!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning
* async function main() {
* const oclif = await import('@oclif/core')
* await oclif.execute({development: true, dir: import.meta.url})
* }
* import { execute } from "@oclif/core"
*
* await main()
* await execute({development: true, dir: import.meta.url})
* ```
*
* @example For ESM run.js
* ```
* #!/usr/bin/env node
* async function main() {
* const oclif = await import('@oclif/core')
* await oclif.execute({dir: import.meta.url})
* }
* import { execute } from "@oclif/core"
*
* await main()
* await execute({dir: import.meta.url})
* ```
*
* @example For CJS dev.js
Expand Down

0 comments on commit 2f1c119

Please sign in to comment.