flipscript

0.0.5 • Public • Published

📜 flipscript

NPM version MIT License fliphub flipfam

fluent script building; flip the script on em

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.

📝 there is a lot that requires documentation here, until they are added the tests and docblocks in the code should be looked at!

📦 usage

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

📘 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()

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.5
    4
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.5
    4
  • 0.0.4
    1
  • 0.0.3
    1

Package Sidebar

Install

npm i flipscript

Weekly Downloads

6

Version

0.0.5

License

none

Last publish

Collaborators

  • aretecode