-
-
Notifications
You must be signed in to change notification settings - Fork 27k
Add an interactive CLI to npm start
#65
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
Conversation
Ooh, very neat! I’m not sure about the exact set of commands but I like the flow. |
What happens if there's a webpak compilation error? Will that get displayed still or does Vorpal hide that from users? As cool as this is there is a lot of value in seeing the explicit webpack bundles being built in the development process. Thoughts? |
@SpencerCDixon it will still get displayed. This CLI doesn't "hide" anything. Moreover, you can turn on the verbose mode to show all raw webpack logs (although we're still deciding on if we want this feature). |
I wouldn’t want to allow verbose logs unless people actually start reporting weird crashes in loaders. |
oh like |
Wow that's a sweet idea @gaearon, almost like a rails console. And sounds good @keyanzhang just wanted to confirm :) |
Sounds awesome. If interested in using Vorpal for building the interactivity in the CLI, feel free to ask me any questions. |
A few more ideas:
|
|
||
vorpal.history('create-react-app-cli'); | ||
|
||
vorpal |
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.
We can use vorpal.parse(process.argv)
to jump straight into a command if extra args are passed into npm start
.
I’m going to close this for now since it’s getting stale.
Since Jest support is merged now, if this PR is resubmitted, I’d like to see it with at least one of these two features. |
Implements #55.
Known issues:
opn
only opens applications (likeAtom.app
) but not binary executables in $PATH. To be specific, an user can't useedit vim
unless there exists aVim.app
. To support that we'll need to use something likeexec
that picks up stuff from$PATH
.Demo:

Available commands:
help
,open (o)
,edit (e)
,verbose (v)
,exit
cc @vjeux @gaearon