← Back to context

Comment by forty

7 hours ago

I put any sufficiently complex command to scripts/<command>.sh and keep the package json as light as possible.

One very big upside I have to use package.json is that we use pnpm which has very sophisticated way of targeting packages with --filter (like "run tests from packages that had modification compared to master and all their transitively dependents packages" which is often exactly what you want to do)

A pet peeve of mine is JS monorepo tools that only run package.json scripts.

Like yeah it's totally reasonable that they go that route, but please just let me pass a command that can be executed without having to wrap it in a package.json script

  • I don't know for others but pnpm has `pnpm exec` which allows running arbitrary commands on some or all of your packages