This PR adds the remaining pieces needed for the bevy build command.
The command is a wrapper around cargo build, but with an additional web sub command which makes it a lot easier to build an app for the browser.
I also plan to add additional features in the feature, like #68.
The PR contains the following changes:
Added cargo install wrapper to install a program if it's missing (prompting the user).
Added helper to obtain the current package name via Cargo.toml. There are likely better ways to do this (perhaps via cargo metadata), but I already had this implemented and we can improve it in a follow-up if needed.
Added helper to determine the active compilation profile, which is needed to determine the path to the build artifact.
Implemented the build command itself.
If you'd prefer smaller PRs let me know and I will split this up further.
This PR adds the remaining pieces needed for the
bevy build
command.The command is a wrapper around
cargo build
, but with an additionalweb
sub command which makes it a lot easier to build an app for the browser. I also plan to add additional features in the feature, like #68.The PR contains the following changes:
cargo install
wrapper to install a program if it's missing (prompting the user).Cargo.toml
. There are likely better ways to do this (perhaps viacargo metadata
), but I already had this implemented and we can improve it in a follow-up if needed.If you'd prefer smaller PRs let me know and I will split this up further.