run-scoped
TypeScript icon, indicating that this package has built-in type declarations

0.1.6 • Public • Published

Run Scoped

Motivation

Avoid duplicating scripts in a monorepo

Manage your scripts in a centralized way using run-scoped

Description

Run arbitrary script from package.json in any sub-directory or package

* See how to set up a monorepo using lerna here

Options

rs [--scope packageNameGlob="*"] [--prefix pathToPackages="packages"]

Usage

Example Setup

package.json

{
  "scripts": {
    "prelog:env": "cross-env FOO=prelog printenv FOO",
    "log:env": "cross-env FOO=log printenv FOO",
    "postlog:env": "cross-env FOO=postlog printenv FOO"
  }
}

packages

packages
├── common
└── greet

Using run-scoped

rs log --scope greet

Outputs

path-your-project/packages/greet

cross-env FOO=prelog printenv FOO

prelog


path-your-project/packages/greet

cross-env FOO=log printenv FOO

log


path-your-project/packages/greet

cross-env FOO=postlog printenv FOO

postlog


Dependencies (3)

Dev Dependencies (8)

Package Sidebar

Install

npm i run-scoped

Weekly Downloads

0

Version

0.1.6

License

none

Unpacked Size

5.35 kB

Total Files

4

Last publish

Collaborators

  • mateja176