Closed JamesLMilner closed 7 years ago
@JamesMilnerUK Thanks for getting involved in Dojo 2!
The @dojo/cli
detects available commands from the projects node_modules
using a couple of conventions. It will try to load any dependency that either starts dojo-cli-*
or is in the @dojo npm namespace and starts with cli-
.
It is these installed commands that actually provide the details used by the cli
to display the help information. So it is indeed by design that the cli
cannot provide help for commands that are not available (installed into node_modules
).
Perhaps should enhance the help text to be clearer or not use a "real" command as the example?
@agubler thanks for getting back to me. Right, that certainly makes sense, thanks for clarifying. I think that there is some scope to potentially clarify this a little in the feedback message.
How about something like this?
export const helpEpilog = `For more information on any of these commands just run them with '-h'.
e.g. 'dojo build -h' will give you the help for the 'build' group of commands.
If a non-builtin command (e.g. build) appears missing from the command list, please ensure it is listed in package.json and correctly installed.`;
@JamesMilnerUK sounds good to me 👍, fancy raising a pr? 😄
Firstly, excited to start looking into Dojo 2, keep up the great work :) Happy to help with this issue if you have some hints on where to look.
Enhancement
Currently if you use the build command with a empty project using the dev built cli, you receive
Which is slightly confusing as the example command is:
It's almost seems like you can't receive help on commands you can't currently use. Maybe this is intended but feels a bit weird from an end developer perspective.
Package Version: 2.0.0-pre
Code
or
Expected behavior:
Help information for the build command regardless of in an initialized/scaffolded app or not.
Actual behavior:
Generic command line help information.