You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The
--bundle PATH
option would create a new folder atPATH
and put all web-related artifacts in that folder.This includes the WASM and JS bindgen, a copy of the assets folder and the
index.html
file.The idea is that only this folder has to be served to run the entire app.
The text was updated successfully, but these errors were encountered: