Skip to content

feat: add serve command support#910

Open
janvennemann wants to merge 2 commits intomainfrom
vite-serve-command
Open

feat: add serve command support#910
janvennemann wants to merge 2 commits intomainfrom
vite-serve-command

Conversation

@janvennemann
Copy link
Contributor

Summary

  • Register the new serve SDK command for the Titanium Vite runtime
  • Extend initBuildPlatform to handle serve alongside build, enabling platform-specific config
  • Add positional platform shorthand so ti serve ios works like ti build --platform ios
  • Prefer Commander's positional args over manual trailing-args parsing
  • Bump version to 8.2.0

Test plan

  • Verify ti serve ios correctly resolves the platform
  • Verify ti serve --platform android still works
  • Verify ti build commands are unaffected by the argument parsing changes
  • Verify ti serve without a platform prompts for selection

Register the new `serve` SDK command and wire up platform-specific
config handling so it works like `build`. Adds positional platform
shorthand (e.g. `ti serve ios`) by preferring Commander's positional
args over the manual trailing-args logic.

Bumps version to 8.2.0.
@janvennemann
Copy link
Contributor Author

Just opening this for discussion for my plans to integrate a Vite based build into the SDK, there are probably a lot of things i've missed and need more fine tuning, e.g. gracefully handle older SDK versions that don't have a serve command.

Replace custom positional platform detection with Commander's native
.argument('[platform]') API. This lets Commander handle the shorthand
`ti build ios` / `ti serve ios` syntax natively instead of manually
checking argv._[0] after parsing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant