All Projects β†’ coderaiser β†’ Redrun

coderaiser / Redrun

Licence: mit
✨🐌 🐎✨ fastest npm scripts runner

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Redrun

Npm Run All
A CLI tool to run multiple npm-scripts in parallel or sequential.
Stars: ✭ 4,496 (+5189.41%)
Mutual labels:  npm-scripts, cli, cli-command, parallel, series, multi-platform, npm
Cpx
A cli tool to watch and copy file globs.
Stars: ✭ 394 (+363.53%)
Mutual labels:  cli, cli-command, npm
Nps
NPM Package Scripts -- All the benefits of npm scripts without the cost of a bloated package.json and limits of json
Stars: ✭ 1,285 (+1411.76%)
Mutual labels:  npm-scripts, cli, npm
Yarpm
CLI tool to run npm scripts with either npm or yarn, depending on how it was started
Stars: ✭ 13 (-84.71%)
Mutual labels:  npm-scripts, cli, npm
Ultra Runner
πŸƒβ›° Ultra fast monorepo script runner and build tool
Stars: ✭ 496 (+483.53%)
Mutual labels:  npm-scripts, parallel, npm
Better Npm Run
πŸƒβ€β™‚οΈ Better NPM scripts runner
Stars: ✭ 635 (+647.06%)
Mutual labels:  npm-scripts, cli-command, npm
Nls
Missing inspector for npm packages.
Stars: ✭ 44 (-48.24%)
Mutual labels:  npm-scripts, cli, npm
Npm Compare
Compare npm packages from your terminal
Stars: ✭ 55 (-35.29%)
Mutual labels:  cli, npm
Pizza Cli
πŸ• Order a pizza in a CLI app (just for fun!)
Stars: ✭ 58 (-31.76%)
Mutual labels:  cli, npm
Cli Error Notifier
Sends native desktop notifications if CLI apps fail
Stars: ✭ 61 (-28.24%)
Mutual labels:  npm-scripts, cli
Flowa
πŸ”₯Service level control flow for Node.js
Stars: ✭ 66 (-22.35%)
Mutual labels:  parallel, series
Awesome Node Utils
some useful npm packages for nodejs itself
Stars: ✭ 51 (-40%)
Mutual labels:  npm-scripts, npm
Cli
The command line vault (Windows, macOS, & Linux).
Stars: ✭ 1,044 (+1128.24%)
Mutual labels:  cli, npm
Changed Log
Returns all commit messages between 2 versions of an NPM module
Stars: ✭ 58 (-31.76%)
Mutual labels:  cli, npm
Fast Xml Parser
Validate XML, Parse XML to JS/JSON and vise versa, or parse XML to Nimn rapidly without C/C++ based libraries and no callback
Stars: ✭ 1,021 (+1101.18%)
Mutual labels:  cli, parser
Run When
Run tasks based on "Git diff" changes πŸƒ βž• βž–
Stars: ✭ 63 (-25.88%)
Mutual labels:  cli, task-runner
Be Course 17 18
πŸŽ“ Backend Β· 2017-2018 Β· Curriculum and Syllabus πŸ’Ύ
Stars: ✭ 44 (-48.24%)
Mutual labels:  cli, npm
Cssparser.js
cssparser.js is a parser that generate json from css with matched orders & structures.
Stars: ✭ 61 (-28.24%)
Mutual labels:  parser, npm
Page2image
πŸ“· page2image is a npm package for taking screenshots which also provides CLI command
Stars: ✭ 66 (-22.35%)
Mutual labels:  cli, npm
Dog
Dog wants to be a very good task runner
Stars: ✭ 84 (-1.18%)
Mutual labels:  cli, task-runner

Redrun License NPM version Dependency Status Build Status Coverage Status

CLI tool to run multiple npm-scripts fast. Supports madly comfortable madrun.

Redrun

Install

npm i redrun -g

Usage

Usage: redrun [...tasks] [options] [-- ...args]
Options:
  -p, --parallel          run scripts in parallel
  -s, --series            run scripts in series
  -q, --quiet             do not output result command before execution
  -c, --calm              return zero exit code when command completed with error
  -P, --parallel-calm     run scripts in parallel and return zero exit code
  -S, --series-calm       run scripts in series and return zero exit code
  -h, --help              display this help and exit
  -v, --version           output version information and exit

Completion

You can enable tab-completion of npm scripts similar to npm's completion using:

redrun-completion >> ~/.bashrc
redrun-completion >> ~/.zshrc

You may also pipe the output of redrun-completion to a file such as /usr/local/etc/bash_completion.d/redrun if you have a system that will read that file for you.

How it works

{
    "one": "npm run two",
    "two": "npm run three",
    "three": "echo 'hello'"
}

Usually this expressions would be executed one-by-one this way:

[email protected]:~/redrun$ npm run one

> [email protected] one /home/coderaiser/redrun
> npm run two


> [email protected] two /home/coderaiser/redrun
> npm run three


> [email protected] three /home/coderaiser/redrun
> echo 'hello'

hello

Usually all this steps is slow, becouse every npm run it is a new process. We use npm run for comfort of build tools of yesterday (like gulp and grunt) but without their weaknesses (a lot dependencies and plugins management frustrations)

What redrun does is expand all this commands into one (which is much faster):

[email protected]:~/redrun$ redrun one
> echo 'hello'
hello

How to use?

Redrun could be used via command line, scripts section of package.json or programmaticly.

const redrun = require('redrun');

redrun('one', {
    one: 'npm run two',
    two: 'npm run three',
    three: 'echo \'hello\''
});
// returns
"echo 'hello'"

redrun('one', {
    one: 'redrun -p two three',
    two: 'redrun four five',
    three: 'echo \'hello\'',
    four: 'jshint lib',
    five: 'jscs test'
});
// returns
"jshint lib && jscs test & echo 'hello'"

Speed comparison

The less spend time is better:

  • npm-run-all: 1m12.570s
  • npm run && npm run: 1m10.727s
  • redrun: 0m38.312s

Here are logs:

npm-run-all:

[email protected]:~/redrun$ time npm run speed:npm-run-all

> speed:npm-run-all /home/coderaiser/redrun
> npm-run-all lint:*


> [email protected] lint:jshint /home/coderaiser/redrun
> jshint bin lib test


> [email protected] lint:eslint-bin /home/coderaiser/redrun
> eslint --rule 'no-console:0' bin


> [email protected] lint:eslint-lib /home/coderaiser/redrun
> eslint lib test


> [email protected] lint:jscs /home/coderaiser/redrun
> jscs --esnext bin lib test


real    1m12.570s
user    0m14.431s
sys     0m17.147s

npm run && npm run

[email protected]:~/redrun$ time npm run speed:npm-run

[email protected] speed:npm-run /home/coderaiser/redrun
> npm run lint:jshint && npm run lint:eslint-bin && npm run lint:eslint-lib && npm run lint:jscs


> [email protected] lint:jshint /home/coderaiser/redrun
> jshint bin lib test


> [email protected] lint:eslint-bin /home/coderaiser/redrun
> eslint --rule 'no-console:0' bin


> [email protected] lint:eslint-lib /home/coderaiser/redrun
> eslint lib test


> [email protected] lint:jscs /home/coderaiser/redrun
> jscs --esnext bin lib test


real    1m10.727s
user    0m14.670s
sys     0m16.663s

redrun

[email protected]:~/redrun$ redrun lint:*
> jshint bin lib test && eslint --rule 'no-console:0' bin && eslint lib test && jscs --esnext bin lib test

real    0m38.312s
user    0m8.198s
sys     0m9.113s

As you see redrun much faster and more laconic way of using npm scripts then regular solutions.

Related

  • madrun - CLI tool to run multiple npm-scripts in a madly comfortable way.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].