Skip to content

Commit

Permalink
Replace ts-node with tsx (#829)
Browse files Browse the repository at this point in the history
* `npm uninstall ts-node && npm install --save-dev tsx`

* Add section about repl
  • Loading branch information
kachick authored Feb 10, 2023
1 parent 9362860 commit 02e4b81
Show file tree
Hide file tree
Showing 3 changed files with 166 additions and 2 deletions.
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ See the section about [Test runner](https://nodejs.org/docs/latest-v18.x/api/tes
Builds the app for production to the `build` folder.<br />
It correctly bundles React in production mode and optimizes the build for the best performance.

## How to run repl

```ts
npx tsx
> const n: string = 42; // You can write with TypeScript except actual type checking
> const { shuffleArray } = await import('./src/common/listHelpers');
undefined
> shuffleArray([1, 2, 3, 4, 5]);
[ 4, 2, 1, 3, 5 ]
> shuffleArray([1, 2, 3, 4, 5]);
[ 3, 2, 1, 4, 5 ]
```

## How to update contributors list

Members will update the list with this command after merging your PR.
Expand Down
153 changes: 152 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"eslint-plugin-deprecation": "^1.3.3",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-react-hooks": "^4.6.0",
"ts-node": "^10.9.1",
"ts-node-test": "^0.3.0",
"tsx": "^3.12.3",
"typescript": "^4.9.5",
"vite": "^4.1.1"
},
Expand Down

0 comments on commit 02e4b81

Please sign in to comment.