-
Notifications
You must be signed in to change notification settings - Fork 37
mprocs.yaml for easy startup app + ui + demo + explorer #1360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a mprocs.yaml
configuration file to enable starting multiple development services simultaneously with a single command. This is useful for developers who need to work on multiple components of the project at once.
- Adds configuration for 6 different processes including app, anvil, demo components, UI storybook, and explorer
- Uses conditional execution to gracefully handle missing directories
- Sets up proper working directories for components in sibling directories
cmd: ["anvil", "--host", "0.0.0.0"] | ||
demo/web: | ||
cwd: "../demo" | ||
cmd: ["sh", "-c", "[ -f package.json ] && yarn dev || echo '../demo not found'"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The command uses a complex shell construct with conditional execution. Consider splitting this into a more readable format or using a dedicated script file for better maintainability.
Copilot uses AI. Check for mistakes.
cmd: ["sh", "-c", "[ -f package.json ] && yarn dev || echo '../demo not found'"] | ||
demo/contracts: | ||
cwd: "../demo" | ||
cmd: ["sh", "-c", "[ -f package.json ] && yarn eth-watch || echo '../demo not found'"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command pattern is duplicated across multiple processes. Consider extracting the conditional logic into a reusable script to reduce code duplication.
Copilot uses AI. Check for mistakes.
cmd: ["sh", "-c", "[ -f package.json ] && yarn dev || echo '../demo not found'"] | ||
demo/contracts: | ||
cwd: "../demo" | ||
cmd: ["sh", "-c", "[ -f package.json ] && yarn eth-watch || echo '../demo not found'"] | ||
ui/storybook: | ||
cwd: "../ui" | ||
cmd: ["sh", "-c", "[ -f package.json ] && yarn dev || echo '../ui not found'"] | ||
explorer: | ||
cwd: "../explorer" | ||
cmd: ["sh", "-c", "[ -f package.json ] && yarn dev || echo '../explorer not found'"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The error messages are inconsistent - some reference the directory path while others don't. Consider standardizing the error message format across all processes.
cmd: ["sh", "-c", "[ -f package.json ] && yarn dev || echo '../demo not found'"] | |
demo/contracts: | |
cwd: "../demo" | |
cmd: ["sh", "-c", "[ -f package.json ] && yarn eth-watch || echo '../demo not found'"] | |
ui/storybook: | |
cwd: "../ui" | |
cmd: ["sh", "-c", "[ -f package.json ] && yarn dev || echo '../ui not found'"] | |
explorer: | |
cwd: "../explorer" | |
cmd: ["sh", "-c", "[ -f package.json ] && yarn dev || echo '../explorer not found'"] | |
cmd: ["sh", "-c", "[ -f package.json ] && yarn dev || echo '[../demo] not found or package.json missing'"] | |
demo/contracts: | |
cwd: "../demo" | |
cmd: ["sh", "-c", "[ -f package.json ] && yarn eth-watch || echo '[../demo] not found or package.json missing'"] | |
ui/storybook: | |
cwd: "../ui" | |
cmd: ["sh", "-c", "[ -f package.json ] && yarn dev || echo '[../ui] not found or package.json missing'"] | |
explorer: | |
cwd: "../explorer" | |
cmd: ["sh", "-c", "[ -f package.json ] && yarn dev || echo '[../explorer] not found or package.json missing'"] |
Copilot uses AI. Check for mistakes.
We often need to work on multiple of these components simultaneously, so it's useful to have a way to start this whole stack in one command