Skip to content
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

Add some kind of watch:all command #62

Open
SebastienGllmt opened this issue Jan 23, 2024 · 1 comment
Open

Add some kind of watch:all command #62

SebastienGllmt opened this issue Jan 23, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@SebastienGllmt
Copy link
Contributor

Right now updating code requires context switching between different terminals. There are so many things to keep track of:

Example: make a change to the DB SQL

  1. npm run compile:db to compile the DB
  2. npm run build to build all the repos
  3. npm run compile:api to build the API
  4. npm run pack && npm run pack:middleware to repackage your L2
  5. npm run compile:api to build your API
  6. npm run chain:start to restart your L1 to clear out the old state
  7. npm run chain:deploy to deploy the contracts to your fresh L1
  8. npm run database:reset to clear your indexer
  9. npm run database:up to start a new indexer
  10. ./paima-engine-linux run to start your L2

and now you can finally check if your code had the right effect in your game. It would be so much better if everything got redeployed automatically for you.

We can easily build our own watch scripts for tools that don't have their own watch scripts using npx watch

Not sure we can this in a way that isn't a footgun if somebody modifies a template to add new folders (but even if they have to waste time realizing their need to update the watch script, it's probably still time saved compared to what we have now)

@SebastienGllmt SebastienGllmt added enhancement New feature or request help wanted Extra attention is needed labels Jan 23, 2024
@GGAlanSmithee
Copy link

I have something like this running locally. The only issue is that npm run chain:start and ./paima-engine-linux run (and possibly any frontend) should (needs to) run in their own terminal because they are their own long-running processes.

This can be achieved in vscode by .vscode tasks and compound launch configurations, but that might miss the mark in terms of "locking" user into that IDE (even though it's probably a vast majority that uses this anyway).

I'm not sure how/if this can be achieved by a terminal/npm only solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants