Skip to content

Commit

Permalink
[#170] Migrate the codebase from CJS to ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangmirs committed Apr 2, 2023
1 parent 855a0c5 commit 8ff092f
Show file tree
Hide file tree
Showing 14 changed files with 906 additions and 222 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ npm install
Run the following command and follow the instructions:

```bash
bin/dev generate {project-name}
bin/dev.js generate {project-name}
```

### Project structure
Expand Down
5 changes: 0 additions & 5 deletions bin/dev

This file was deleted.

5 changes: 5 additions & 0 deletions bin/dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env node --loader ts-node/esm --experimental-specifier-resolution=node
(async () => {
const oclif = await import('@oclif/core')
await oclif.execute({ type: 'esm', development: true, dir: import.meta.url })
})();
8 changes: 0 additions & 8 deletions bin/run

This file was deleted.

8 changes: 8 additions & 0 deletions bin/run.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env node

process.env.NODE_ENV = 'production';

(async () => {
const oclif = await import('@oclif/core')
await oclif.execute({ type: 'esm', dir: import.meta.url })
})();
Loading

0 comments on commit 8ff092f

Please sign in to comment.