Skip to content

Commit

Permalink
fix: added missing typescript-tsx-esm-import files (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Jul 4, 2024
1 parent 05ed9b4 commit d782cff
Show file tree
Hide file tree
Showing 8 changed files with 1,796 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/typescript-tsx-esm-import/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
lib
4 changes: 4 additions & 0 deletions packages/typescript-tsx-esm-import/.mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extension": ["ts"],
"spec": "src/**/*.spec.ts"
}
16 changes: 16 additions & 0 deletions packages/typescript-tsx-esm-import/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# TypeScript with `tsx` Loader

A standalone project showing TypeScript source files transpiled on-the-fly with [`--import tsx`](https://tsx.is/node) as a Node ECMAScript Modules importer.

```shell
npm i
npm run test
```

Note that the `tsconfig.json` file has `compilerOptions`:

- `"noEmit": true`: as there's no need to transpile `.ts` files on disk to `.js` files on disk before running these tests
- `"module": "ESNext`: indicating code should be transpiled in-memory as ESM

Additionally, `package.json` has `"type": "module"`.
If it didn't, TypeScript source files would need the `.mts` extension.
Loading

0 comments on commit d782cff

Please sign in to comment.