packages/cli-harnesses/README.md
This folder contains a series of CLI harnesses that represent common structures of dioxus apps.
We test these projects as a form of smoke testing to ensure our argument resolution works properly.
These projects might not be functionally useful, but they do have interesting properties that the CLI tests.
The tests for the CLI are contained within the CLI itself.
The items in this folder are procedurally generated by tests in the CLI crate. We will delete EVERYTHING that ends up here.
Determine which features, triple, profile, etc to pass to the build.
Most of the time, users should use dx serve --<platform> where the platform name directly
corresponds to the feature in their cargo.toml. So,
dx serve --web will enable the web featuredx serve --mobile will enable the mobile featuredx serve --desktop will enable the desktop featureIn this case, we set default-features to false and then add back the default features that aren't renderers, and then add the feature for the given renderer (i.e., web/desktop/mobile). We call this "no-default-features-stripped."
There are a few cases where the user doesn't need to pass a platform.
dioxus = { features = ["web"] }default = ["web"]web = ["dioxus/web"], server = ["dioxus/server"]Note that we only use the names of the features to correspond with the platform. Platforms are "super triples", meaning they contain information about
By default, the --platform presets correspond to:
Fullstack usage is inferred from the presence of the fullstack feature or --fullstack.
server feature is present, we don't run the serverserver feature