Skip to content

Commit 30eef20

Browse files
committed
rebuild readme
1 parent 167a7fe commit 30eef20

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

README.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ You can use this sample configuration as a starting point:
285285

286286
```jsonc title="tsconfig.json"
287287
{
288-
// This is an alias to @tsconfig/node12: https://github.com/tsconfig/bases
289-
"extends": "ts-node/node12/tsconfig.json",
288+
// This is an alias to @tsconfig/node16: https://github.com/tsconfig/bases
289+
"extends": "ts-node/node16/tsconfig.json",
290290

291291
// Most ts-node options can be specified here using their programmatic names.
292292
"ts-node": {
@@ -675,7 +675,7 @@ ts-node --scope
675675

676676
Scope compiler to files within `scopeDir`. Anything outside this directory is ignored.
677677

678-
\*Default: `false` <br/>
678+
*Default:* `false` <br/>
679679
*Environment:* `TS_NODE_SCOPE`
680680

681681
### scopeDir
@@ -721,10 +721,12 @@ Disable top-level await in REPL. Equivalent to node's [`--no-experimental-repl-
721721

722722
Enable experimental hooks that re-map imports and require calls to support:
723723

724-
* resolves `.js` to `.ts`, so that `import "./foo.js"` will execute `foo.ts`
725-
* resolves `.cjs` to `.cts`
726-
* resolves `.mjs` to `.mts`
727-
* allows including file extensions in CommonJS, for consistency with ESM where this is often mandatory
724+
* remapping extensions, e.g. so that `import "./foo.js"` will execute `foo.ts`. Currently the following extensions will be mapped:
725+
* `.js` to `.ts`, `.tsx`, or `.jsx`
726+
* `.cjs` to `.cts`
727+
* `.mjs` to `.mts`
728+
* `.jsx` to `.tsx`
729+
* including file extensions in CommonJS, for consistency with ESM where this is often mandatory
728730

729731
In the future, this hook will also support:
730732

@@ -744,7 +746,7 @@ ts-node --experimentalSpecifierResolution node
744746
```
745747

746748
Like node's [`--experimental-specifier-resolution`](https://nodejs.org/dist/latest-v18.x/docs/api/esm.html#customizing-esm-specifier-resolution-algorithm), but can also be set in your `tsconfig.json` for convenience.
747-
Requires `esm` to be enabled.
749+
Requires [`esm`](#esm) to be enabled.
748750

749751
*Default:* `explicit`<br/>
750752

@@ -1059,7 +1061,7 @@ It is often better to use `tsc --noEmit` to typecheck as part of your tests or l
10591061

10601062
* Enable [swc](#swc)
10611063
* This is by far the fastest option
1062-
* Enable [`transpileOnly`](#options) to skip typechecking without swc
1064+
* Enable [`transpileOnly`](#transpileonly) to skip typechecking without swc
10631065

10641066
## With typechecking
10651067

@@ -1189,15 +1191,15 @@ sourcemap support, and global ts-node CLI. Plugins automatically derive an appro
11891191
The `transpiler` option allows using third-party transpiler plugins with ts-node. `transpiler` must be given the
11901192
name of a module which can be `require()`d. The built-in `swc` plugin is exposed as `ts-node/transpilers/swc`.
11911193

1192-
For example, to use a hypothetical "speedy-ts-compiler", first install it into your project: `npm install speedy-ts-compiler`
1194+
For example, to use a hypothetical "@cspotcode/fast-ts-compiler", first install it into your project: `npm install @cspotcode/fast-ts-compiler`
11931195

11941196
Then add the following to your tsconfig:
11951197

11961198
```jsonc title="tsconfig.json"
11971199
{
11981200
"ts-node": {
11991201
"transpileOnly": true,
1200-
"transpiler": "speedy-ts-compiler"
1202+
"transpiler": "@cspotcode/fast-ts-compiler"
12011203
}
12021204
}
12031205
```

0 commit comments

Comments
 (0)