Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

dioxus create some_project now actually creates said project #95

Merged
merged 4 commits into from
Feb 15, 2023

Conversation

mgbvox
Copy link
Contributor

@mgbvox mgbvox commented Jan 19, 2023

This addresses issues #93 and (partially) #94.

Logic in DioxusConfig::load() was requiring the presence of a cargo crate before actually running the project creation flow; this prevented running dioxus create some_project in any arbitrary directory, and created a sub-crate inside cargo crate directories (which is, presumably, not desired behavior).

By catching the crate_root error raised in ::load() when running outside of a crate, we enable the creation of new projects from scratch, e.g.:

cd my/favorite/directory
mkdir empty
ls
# nothing!
dioxus create awesome_project
... stuff happens ...
ls
# contents: awesome_project
cd awesome_project
dioxus serve
... builds and serves as expected! 

Also added some grammar fixes.

@mrxiaozhuox mrxiaozhuox merged commit 90ee614 into DioxusLabs:master Feb 15, 2023
@mgb-ingenuity mgb-ingenuity deleted the mgb-dioxus-create branch February 21, 2023 13:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants