Closed JoakimSoderberg closed 6 years ago
I agree with everything except the context-aware help command. au new
is only relevant when you're not inside a project directory. It's not useful to show au build
outside of a project directory, or to show au jest
as an option when your project is not setup for jest.
Well if that is important, then at least provide a full_help
so I can see everything available like in normal command line applications.
But most important I guess is not to have a bug where all you see is new
in an existing project directory.
Yep i'll have a look what's causing that.
Ok thanks.
I have a use case for the help
stuff, which I use quite often.
Say I have a console window open, I'm inside of a project directory and I'm using au
... ok now I want to read the help, but I don't want to spam my backlog by repeatedly running au help
(especially not when it does clear
like today).
Instead I quickly open a second console window and type au help
... oh right, now I'm not in a project dir so all I get is new
shown in the help.
Extremly annoying.... So then I have to cd
into some project. This is not how any other cli-app works, and au
shouldn't either.
Thanks for the description of the use case. I'm trying to see how that would work in practice, you'd see commands that you're not going to be able to use for your project (and you end up with a pretty large output too). It would be kind of misleading for the CLI to tell you that you can run au karma
while Karma hasn't been setup, or that you could run au karma
from outside a project dir.
In addition, the Aurelia CLI allows you to create your own au <something>
commands by adding a gulp task to the aurelia_project/tasks
folder of your project. Those commands then show up in au help
, but would be missing from the complete list of available commands that we're discussing.
maybe au help --full
?
the list will be pretty big, but maybe it can be braked down to section regarding the context in witch you can potentially run au
? it's a bit clunky..
I'm submitting a feature request
The usability of the cli is really bad. Some extremly annoying behavior that is not common for cli-applications (at least not outside the Javascript world):
au
does aclear
of the screen. Extremely annoying! You should not decide for the user to clear the screen.help
output is different depending on context. Very bad. For example, I have run into buggy scenarios whereaurelia-cli
does not recognize it is in an existing aurelia-project and gives "new" and "help" as the only options. All command line options should be shown when runninghelp
, it should not be context dependent. At least have a "full_help" command or something if it's so important to hide things for the user.au
installed globally, and run it in a project directory, it fails to recognize it as a project??? I first have to runyarn
and install it as a local dependency to get things to work. If there is some reason for this, at least a helpful error should be shown about this.