README
kpo
A task runner that goes where npm scripts won't, for the true capo.
Install
Run npm install -g kpo
for a global install.
Commands
CLI options
These are common options for all kpo subcommands. They must always be passed before any subcommand or scope.
Usage:
$ kpo [options] [command]
Options:
-f, --file <path> Configuration file
-d, --dir <path> Project directory
-e, --env <value> Environment variables
--level <value> Logging level
--prefix Prefix tasks output with their route
-h, --help Show help
-v, --version Show version number
Commands:
:run Runs tasks (default)
:watch Watch paths and run tasks on change events
:list List available tasks
:lift Lift tasks to package
Examples:
$ kpo foo bar baz
$ kpo -e NODE_ENV=development -e BABEL_ENV=node :run foo
kpo :run
Runs tasks.
kpo :run
doesn't take additional options, other than the general CLI options.
Note that the :run
command can be omitted. When no command is passed, kpo will assume you're passing it tasks to run. Hence, kpo :run foo bar
and kpo foo bar
are equivalent.
kpo :watch
Watch a path and run tasks on change events
Usage:
$ kpo :watch [options] -- [args]
Options:
-g, --glob Parse globs in paths
-p, --prime Runs the task once when ready to wait for changes
-f, --fail Finalizes the watch effort if a given task fails
-c, --clear Clear stdout before tasks execution
-i, --include <value> Paths to include
-e, --exclude <value> Paths to exclude
-s, --symlinks Follow symlinks
--parallel Don't cancel running tasks
--debounce <number> Avoid rapid task restarts (ms)
--depth <number> Limit subdirectories to traverse
--poll <number> Use polling for every ms interval
-h, --help Show help
Examples:
$ kpo :watch -i ./src foo bar baz
$ kpo :watch -i ./src -i ./test foo
$ kpo -e NODE_ENV=development :watch -i ./src bar
kpo :list
List available tasks
Usage:
$ kpo :list [options]
Options:
--defaults List default tasks and subtasks by their own
-h, --help Show help
kpo :lift
Lift tasks to a package.json
Usage:
$ kpo :lift [options]
Options:
--purge Purge all non-kpo scripts
--defaults Lift default tasks and subtasks by their own
--mode <value> Lift mode of operation (confirm, fix, dry, audit)
-h, --help Show help