0.1.6 • Published 2 years ago

run-scoped v0.1.6

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

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


0.1.6

2 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago