Skip to content

Commit 67ffdc0

Browse files
author
Lere Williams
committed
Switch to ESM modules
1 parent ee565c2 commit 67ffdc0

File tree

6 files changed

+16
-25
lines changed

6 files changed

+16
-25
lines changed

bin/dev

Lines changed: 0 additions & 17 deletions
This file was deleted.

bin/dev.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning
2+
3+
import {execute} from '@oclif/core'
4+
5+
await execute({development: true, dir: import.meta.url})

bin/run

Lines changed: 0 additions & 5 deletions
This file was deleted.

bin/run.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env node
2+
3+
import {execute} from '@oclif/core'
4+
5+
await execute({dir: import.meta.url})

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "CLI wrapper for the sizeup library",
55
"author": "Ọlálérè Williams",
66
"bin": {
7-
"sizeup": "./bin/run"
7+
"sizeup": "./bin/run.js"
88
},
99
"homepage": "https://github.com/lerebear/sizeup-cli",
1010
"license": "MIT",
@@ -75,5 +75,6 @@
7575
"keywords": [
7676
"oclif"
7777
],
78+
"type": "module",
7879
"types": "dist/index.d.ts"
7980
}

tsconfig.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
"compilerOptions": {
33
"declaration": true,
44
"importHelpers": true,
5-
"module": "commonjs",
5+
"module": "node16",
6+
"moduleResolution": "node16",
67
"outDir": "dist",
78
"rootDir": "src",
89
"strict": true,
9-
"target": "es2019"
10+
"target": "es2019",
11+
"composite": true
1012
},
1113
"ts-node": {
1214
"esm": true

0 commit comments

Comments
 (0)