0.1.5 • Published 7 years ago

gaffle v0.1.5

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Gaffle

Installation

npm install --save-dev gaffle

Example

Add this to your package.json:

{
  "scripts": {
    "test": "gaffle"
  },
  "gaffle": {
    "jest": { "cmd": "jest $0", "env": { "NODE_ENV": "test" } },
    "jest": { "cmd": "jest --watch", "env": { "NODE_ENV": "test" } },
    "flow": "flow check $0"
  }
}

Usage: npm test jest / npm test jest watch / npm test flow.

Why?

For organizing advanced scripts in package.json into simpler commands, and being able to run them via special commands such as npm test that suppresses some annoying output.

Config schema

{
  "<short-hand command 1>": "<actual command>",
  "<short-hand command 2>": {
    "cmd": "<actual command>",
    "env": {
      "SOME_ENV_VAR": "<env var value>"
    },
    "desc": "<Description of the command>"
  },
  "<short-hand command 3>": "<actual command> $0 $1",
  "<short-hand command 4>": "<actual command> $*"
}

Running an invalid short-hand command (or no command) yields a help output that lists the commands

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago