Misty is a concurrent script runner that can watch directories and restart processes on file changes. Also she's a Pokemon Gym Leader. 🤷
When to use Misty
Misty shines when you want to launch multiple scripts within the same terminal. She is especially usefull for e.g. developing an electron app where you have to run multipe commands at once like frontend, backend, database and electron + restarting electron whenever files for the main renderer change.
How to use Misty
Misty is controlled via the
misty.yml in your projects root directory.
1. Install Misty
npm install @adlk/misty
3. Run Misty
# misty.yml frontend: cmd: HOST=localhost PORT=4000 yarn start backend: cmd: yarn start cwd: ../backend electron: cmd: ./node_modules/.bin/electron . cwd: ../desktop-app waitOn: http://localhost:4000 watchDir: ./src database: cmd: rethinkdb cwd: ../db
Every Root level element is a task. The key will be used as a task name.
cmd: the command that should be executed
cwd: the directory the command should be executed
waitOn: Wait for files, ports, sockets, or http(s) to be available. Using wait-on.
watchDir: the directory that should be watched for file changes. On file changes, the process will be restarted. (Useful for e.g. developing in electrons
watchDiris relative to
- Exit misty when task in
- Add scenarios (= superset of tasks)
- Add alternative way to provide config (e.g.
npx misty --config='./my-misty-config')
- Tests 🚨