Skip to content

Commit

Permalink
new file: run-multiple-scripts.md
Browse files Browse the repository at this point in the history
  • Loading branch information
byt3h3ad committed Mar 9, 2024
1 parent 211d4b3 commit a9556a8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions node/run-multiple-scripts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# How to run multiple scripts simultaneously

Use a regex with `pnpm run` to run multiple scripts simultaneously. Ditch `npm-run-all` or `concurrently`.

```javascript
{
"dev": "pnpm run \"/dev:/\"",
"dev:tsc": "tsc --watch --preserveWatchOutput",
"dev:node": "node --watch dist/index.js",
"dev:esbuild": "pnpm run build --watch"
}
```

`--preserveWatchOutput` prevents the console from being cleared by `tsc --watch` when you're running multiple scripts simultaneously.

[source](https://x.com/mattpocockuk/status/1764614629613867093)

0 comments on commit a9556a8

Please sign in to comment.