https://github.com/heyputer/dev-runner
A simple launcher and interactive prompt for multiple processes.
https://github.com/heyputer/dev-runner
Last synced: over 1 year ago
JSON representation
A simple launcher and interactive prompt for multiple processes.
- Host: GitHub
- URL: https://github.com/heyputer/dev-runner
- Owner: HeyPuter
- License: mit
- Created: 2024-02-12T00:15:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-13T18:28:02.000Z (over 2 years ago)
- Last Synced: 2025-03-27T21:22:38.626Z (over 1 year ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dev-runner
```
npm install -g @heyputer/dev-runner
```
This is a convenient utility to run multiple processes when something
like `supervisord` is overkill, or you can think of it as a pre-shaven
yak you just watched float by.
Simply write a configuration file in json5 format with all the commands
you'd like to run:
```javascript
{
services: [
{
name: 'static-host',
pwd: './dist',
command: 'npx http-server -p 8080',
},
{
name: 'rollup-watcher',
pwd: '.',
command: 'npx rollup -c rollup.config.js --watch',
},
]
}
```
Then run `dev-runner` and specify your config file's name:
```
dev-runner run.json5
```
If a config filename is not specified, it will try `run.json5` by default.
## Features
### Variables
A command specified in the `run.json5` file can contain variables which
are loaded from another json5 file specified as the second argument to
`dev-runner` (`local.json5` by default).
For example, this can be your `run.json5`:
```javascript
{
services: [
{
name: 'static-https',
pwd: './dist',
command: 'npx http-server =p 8443 -S -C "{cert} -L "{key}"'
}
]
}
```
and this can be your `local.json5`:
```javascript
{
cert: '/var/my-certs/cert.pem',
key: '/var/my-certs/key.pem',
}
```
Then you can run either `dev-runner` or `dev-runner run.json5 local.json5`