testdouble / scripty

Because no one should be shell-scripting inside a JSON file.
MIT License
963 stars 23 forks source link

alternative syntax #30

Closed boneskull closed 8 years ago

boneskull commented 8 years ago

What if:

{
  "scripts": {
    "scripty": "scripty"
  }
}
$ npm run scripty my:script

???

searls commented 8 years ago

:-1:, I think it's how I would want it to be honest

First, the purpose of the module is to allow folks to extract scripts as a refactor without changing their existing CLI commands (e.g. Whoever introduces scripty doesn't need to educate their team to start running a new command, they can just keep running, say, npm run foo:bar as always).

Second, if there is any confusion as to where a script is or how it's implemented, all someone needs to do is run it and the first thing scripty does is tell you what it is running. If it's too hard for contributors to figure out, folks could document it however they like ("test": "scripty #see scripts/test")