:runner: :mountain: Ultra Runner
Smart and beautiful script runner that hijacks any npm run
, yarn
and npx
calls for ultra fast execution.
:question: What
| npm run | npx | yarn | yarn exec | ultra |
---|
package.json scripts | :white_check_mark: | :x: | :white_check_mark: | :x: | :white_check_mark: |
./node_modules/.bin/ | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
system binaries | :x: | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: |
:package: Installation
Install with npm
or yarn
globally
npm install -g ultra-runner
yarn global install ultra-runner
locally inside your project. use with npx ultra
npm install --dev ultra-runner
yarn add --dev ultra-runner
See optional configuration for information on how to setup concurrent script execution.
:rocket: Usage
$ ultra --help
Usage: ultra [options]
Options:
-c|--concurrent Run the given commands concurrently
-p|--parallel alias for --concurrently
--flat disable fancy output, spinners and seperate command output. Default when not a TTY. Useful for logging (default: false)
--raw Output only raw command output
-s|--silent skip script output. ultra console logs will still be shown
--color colorize output (default: true)
--no-color don't colorize output
-d|--dry-run output what would be executed
-v|--version output the version number
-h, --help output usage information
:gear: Optional Configuration
To allow parallel execution of your scripts, you can specify scripts that should run concurrently,
in your package.json
.
{
"scripts": {
"lint:eslint": "npx eslint bin/*.js src/*.ts __tests__/*.ts --cache",
"lint:docs": "npx markdownlint *.md",
"lint:ts": "npx tsc -p tsconfig.build.json --noEmit",
"lint": "yarn lint:eslint && yarn lint:docs && yarn lint:ts",
"prebuild": "yarn lint && yarn jest",
"build": "..."
},
"ultra": {
"concurrent": ["lint"]
}
}
yarn build
will run the lint
and jest
commands sequentiallyultra build
will run all lint
commands concurrently and then execute jest
. (note that we can also add prebuild
to concurrent
, since tests don't depend on linting. this way all commnands would run concurrently)
Example output for ultra lint
:zap: Benchmark
| npm run | npx | yarn | yarn exec | ultra |
---|
package.json scripts | :white_check_mark: | :x: | :white_check_mark: | :x: | :white_check_mark: |
./node_modules/.bin/ | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
system binaries | :x: | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: |
execution overhead (1) | 250ms | 60ms | 220ms | 200ms | 80ms |
1. each program was run 10x with the command true
or {scripts:{"true":"true}}
to calculate the execution overhead
Output Modes
TODO