1.8.7 • Published 2 years ago

@plasmohq/rps v1.8.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

MIT 🚀 Plasmo Corp.

1.8.7

2 years ago

1.8.6

2 years ago

1.8.5

2 years ago

1.8.4

2 years ago

1.8.3

2 years ago

1.8.2

2 years ago

1.8.1

3 years ago

1.8.0

3 years ago

1.7.0

3 years ago

1.6.0

3 years ago

1.5.3

3 years ago

1.3.6

3 years ago

1.3.5

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago