1.8.7 • Published 10 months ago
@plasmohq/rps v1.8.7
RPS
Run pnpm/npm/yarn scripts in sequential or in parallel, cross-platform. This is a hard fork of npm-run-all
with the following enhancements:
- Rewrite in Typescript, with esbuild bundling
- Automated dependencies upkeep with renovate bot
- Run logic are decoupled between syncronous vs asyncronous, allowing much cleaner spawn code, audit it here
Usage
package.json scripts
Install the package as a dev dependency, swapping pnpm
with your preferred package manager:
pnpm i -D @plasmohq/rps
Then, in your package.json scripts, you can replace sequential script with run-s
:
- "prepare": "pnpm run clean && pnpm run build"
+ "prepare": "run-s clean build"
Or parallel script with run-p
:
- "start": "pnpm run watch & pnpm run serve"
+ "start": "run-p watch serve"
You can also use glob patterns:
"build": "run-s build:* compile",
"build:codegen": "node ./scripts/codegen.mjs",
"build:docs": "node ./scripts/docs.mjs",
"build:lint": "node ./scripts/lint.mjs",
"compile": "run-p compile:*",
"compile:linux": "node ./scripts/linux.mjs",
"compile:macosx": "node ./scripts/macosx.mjs",
"compile:win32": "node ./scripts/win32.mjs",
nodejs API
You can import the runners from this module and use it like so:
#!/usr/bin/env node
import { run } from "@plasmohq/rps"
run(["clean", "build"]) // sequential
run(["watch", "serve"], true) // parallel
Acknowledgment
License
1.8.7
10 months ago
1.8.6
11 months ago
1.8.5
1 year ago
1.8.4
1 year ago
1.8.3
1 year ago
1.8.2
1 year ago
1.8.1
1 year ago
1.8.0
1 year ago
1.7.0
1 year ago
1.6.0
1 year ago
1.5.3
2 years ago
1.3.6
2 years ago
1.3.5
2 years ago
1.5.2
2 years ago
1.5.1
2 years ago
1.5.0
2 years ago
1.4.0
2 years ago
1.3.4
2 years ago
1.3.3
2 years ago
1.3.2
2 years ago
1.3.1
2 years ago
1.3.0
2 years ago