-
Notifications
You must be signed in to change notification settings - Fork 30k
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
doc: repl: add defineComand and displayPrompt #3765
Conversation
@@ -190,15 +194,59 @@ be emitted. | |||
Example of listening for `reset`: | |||
|
|||
// Extend the initial repl context. | |||
var r = repl.start({ options ... }); | |||
var replServer = repl.start({ options ... }); |
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.
Nit: const instead of var?
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.
Other pre-existing examples in the doc use var
for such things, so I thought it was best to keep with the style already in this doc. Perhaps instead a future PR can convert them all in one fell swoop?
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.
Sure. It's a nit. Ignore it.
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.
Cool beans.
LGTM with one typo correction that should happen and a bunch of nits that can be ignored if you wish because they are, you know, just nits. |
a7d042d
to
5c80312
Compare
Cool, yeah, I think the |
LGTM |
Also some minor edits so the additions make sense.
5c80312
to
1640a2f
Compare
LGTM |
Also some minor edits so the additions make sense. PR-URL: nodejs#3765 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Landed in 061b2c8 |
Not to be a doc-nazi, but could we put the class definition first, and then resort alpha? |
@tflanagan Whoops! Did we just mess up a bit of the alphabetizing work that you and jasnell did? Sorry about that. Since this is now merged with master, we'll want a separate PR to re-alphabetize. Do you want to put together a PR on this file for it? I'm happy to do if you'd rather not. |
@Trott no worries! I figured this would happen once or twice :) I'll take care of it on Monday |
Also some minor edits so the additions make sense. PR-URL: #3765 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Also some minor edits so the additions make sense. PR-URL: #3765 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
landed in v4.x-staging in 5254fda |
Also some minor edits so the additions make sense.
I've used
defineCommand
several times now, figuring out how to use it by viewing the source. I figured it probably should be documented.