JSPM

script-chain

0.0.9
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11
  • Score
    100M100P100Q38937F
  • License MIT

fluent script building

Package Exports

  • script-chain

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (script-chain) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

📜⛓ script-chain

NPM version MIT License fliphub fluents Build Status

fluent script building

build scripts to run that are aware of the context; defining NODE_ENV in the subprocess env, after the npm script, at the beginning of a node or lerna script, whether values should be stringified.

📖 documentation

🔬 tests

📦 usage

yarn add script-chain
npm i script-chain --save
const {ScriptFlip} = require('script-chain')

📘 examples

easy

const scripts = new ScriptFlip()
scripts
  .add()
  .npm('diggy')
  .env('magic')
  .flag('env.zoolala', 'aoao')
  .arg('-e')

monorepo

makes tackling monorepo execution scripts a breeze

const script = new ScriptFlip()
  .add()
  .env('prod')
  .lerna()
  .prefix('inferno')
  .scope('app1,app2,inferno')
  .log('info')
  .concurrency(1)
  .group(2)
  .raw('node')
  .flag('row', '0')
  .bin('tsc')

script.includes('--scope=+(inferno-app1|inferno-app2|inferno)')

running

will run commands in a subprocess

const scripts = new ScriptFlip()
scripts
  .add()
  .npm('diggy')
  .env('magic')
  .flag('env.zoolala', 'aoao')
  .arg('-e')

const results = await scripts.run()