-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added config file for CLI #282
Conversation
Deploying mopro with Cloudflare Pages
|
I assumed that users will not manually remove the *Bindings folder in the initialized project created with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kimi changes the term platform
to framework
so I think maybe you need to merge the main
branch to see the latest changes 🙏🏻
cli/src/create.rs
Outdated
// Adding more information on the list | ||
let requires = ["ios", "android"]; | ||
let missing: Vec<&str> = requires | ||
.iter() | ||
.filter(|&&req| !config.target_platforms.contains(req)) | ||
.cloned() | ||
.collect(); | ||
|
||
if !missing.is_empty() { | ||
items.push(format!( | ||
"{:<12} - Requires {} binding(s)", | ||
template, | ||
missing.join("/") | ||
)); | ||
unselectable.push(true); | ||
continue; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cli/src/create.rs
Outdated
continue; | ||
} | ||
} | ||
|
||
if config.target_platforms.contains(template) { | ||
items.push(template.to_string()); | ||
unselectable.push(false); | ||
} else { | ||
items.push(format!("{:<12} - Require binding", template)); | ||
unselectable.push(true); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found the correct logic is like this
You should display the result of react-native
and flutter
if it is selectable
continue; | |
} | |
} | |
if config.target_platforms.contains(template) { | |
items.push(template.to_string()); | |
unselectable.push(false); | |
} else { | |
items.push(format!("{:<12} - Require binding", template)); | |
unselectable.push(true); | |
} | |
// continue; | |
} else { | |
items.push(template.to_string()); | |
unselectable.push(false); | |
} | |
} else if config.target_platforms.contains(template) { | |
items.push(template.to_string()); | |
unselectable.push(false); | |
} else { | |
items.push(format!("{:<12} - Require binding", template)); | |
unselectable.push(true); | |
} |
I believe the term 'framework' doesn't fit well in the 'build' phase. We've been using the term 'template' in the 'create' phase, so I decided to keep 'template' for printout strings in the 'create' phase while using 'framework' in the code for consistency. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
thank you!
Related issue #264
Config.toml
whenmopro init
mopro build
andmopro create
The template selection is more informative like one below: