./scripts
folderinvoke-script
is syntactic sugar around executing files in your scripts
folder.
If you are in a directory containing a scripts folder that looks like this:
scripts
|-- build.sh
|-- deploy
| `-- server.sh
`-- echo_1.sh
Do this:
```bash $ invoke-script Available tasks: -> [build] -> [deploy/server] -> [echo_1]
$ invoke-script build compiling stuff... done ```
They don't have to be bash scripts. Anything with a "shabang" line will do.
$ echo -e "#!/usr/bin/env python\nprint(\"HELLO PYTHON\")" > scripts/wow.py
$ chmod u+x scripts/**/*
$ invoke-script
Available tasks:
-> [build]
-> [deploy/server]
-> [echo_1]
-> [wow]
$ invoke-script wow
HELLO PYTHON
Variables are passed along:
$ echo -e "#!/usr/bin/env node\nconsole.log(process.env.HELLO)" > scripts/deploy/db.js
$ chmod u+x scripts/**/*
$ invoke-script
$ HELLO="hello node" invoke-script deploy/db
hello node