add start task and refactor api server names #147
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds the
gro start
task. If you know Gro you know that means there's now asrc/start.task.ts
file, assuming you didn't forget, which happens to everyone, even the best of robots. For now,gro start
just tries to build if needed, and otherwise, it spawns annpm start
with your args. I may change this before merging; I'm thinking of making it check for a series of paths to start (paths like the API server, the Node SvelteKit adapter, or really, paths derived from the config, and not being lazy with hardcoded defaults), then if none is found, bail with an error, never deferring tonpm start
, so users don't get used to that.This PR also refactors some things around the API server. Previously we called it the "Gro server", now it's the "API server". I don't like the port handling but I'm not sure the best way to handle that with the Vite proxy being configured in
svelte.config.cjs
. What if we had the config attempt to query for the port? What if Gro wrote to a file, to keep things fast and off the network?Anyway, the API server stuff is technically breaking since we're exposing so much API. That's uh, maybe unsustainable for user experience reasons.
We have another breaking change: the way builds are handled in
dist/
. It now tries to mirror the source tree as much as possible.