Open jsbean opened 7 years ago
@brianlheim thoughts?
One thing that's weird is --demo
is only applicable for --type -f
and not --type -a
. It's not properly orthogonal. It would require more nesting, which I'm not sure is totally possible yet.
Perhaps we start like this, and throw an error if you try to do --type -a --demo
, and refactor later if the knowledge has been gained?
Also, am I doing the syntax right?
Common practice is for single-character options to be preceded by -
and any options with longer names by --
. That way you can concatenate multiple options as in the command ls -alin
== ls -a -l -i -n
. So the most idiomatic command set would use --frameworks
& --config
for update
and add -p
, -t
for init
.
By --type -a --demo
I think you mean --type a --demo
. Generally only options start with -
. The syntax definitely takes some getting used to! And yeah, for now throw an error if someone explicitly calls -t a --demo
.
Also, are there default values for init
? If not, I think it'd make more sense to have the command just be init [-d] platform type
Ahh, yes re: --type a --demo
.
Looking closer to this:
Options:
help
(shows options / commands)init
--platform
: [all | macOS | iOS]
= all
--type
: [[f | framework] | [a | app]]
= framework
--demo
(makes demo app targets for frameworks)update
: Update and inject frameworksconfig
: Generate configuration
Options:
help
(shows options / commands)init
--platform
:[all | macOS | iOS]
=all
--type
:[[f | framework] | [a | app]]
=framework
--demo
(makes demo app targets for frameworks)update
[-f | -frameworks]
: Update frameworks[-c | -config]
: Update configurationSee the Carthage command line tool implementation of Commandant.