1
0
Fork 0
mirror of https://github.com/kou029w/_.git synced 2025-01-30 22:08:02 +00:00
This commit is contained in:
Nebel 2023-12-19 14:05:09 +09:00
parent 106ed8c6ea
commit 4993bec7dc
Signed by: nebel
GPG key ID: 79807D08C6EF6460
3 changed files with 289 additions and 329 deletions

View file

@ -1,5 +1,29 @@
# TypeScript で書いたサーバーをワンライナーで構築してみよう # TypeScript で書いたサーバーをワンライナーで構築してみよう
tsx
```
npx tsx main.ts
```
tsx + watch
```
npx tsx --watch main.ts
```
esbuild (esbuild-register)
```
node -r esbuild-register main.ts
```
esbuild (esbuild-register) + watch
```
node -r esbuild-register --watch main.ts
```
tsup tsup
``` ```
@ -11,23 +35,3 @@ tsup + watch
``` ```
npx tsup main.ts --clean --watch --onSuccess 'node dist/main.js' npx tsup main.ts --clean --watch --onSuccess 'node dist/main.js'
``` ```
ts-node
```
npx ts-node-transpile-only main.ts
```
ts-node + watch
n/a
esbuild (esbuild-register)
```
node -r esbuild-register main.ts
```
esbuild (esbuild-register) + watch
n/a

View file

@ -3,13 +3,13 @@
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"@types/express": "^4.17.17", "@types/express": "^4.17.21",
"@types/node": "^20.3.1", "@types/node": "^20.10.5",
"esbuild": "^0.18.4", "esbuild": "^0.18.20",
"esbuild-register": "^3.4.2", "esbuild-register": "^3.5.0",
"express": "^4.18.2", "express": "^4.18.2",
"ts-node": "^10.9.1", "tsup": "^7.2.0",
"tsup": "^7.0.0", "tsx": "^4.6.2",
"typescript": "^5.1.3" "typescript": "^5.3.3"
} }
} }

560
ts/pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff