Skip to content
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: minor clarification in modules api doc. #1983

Merged
merged 1 commit into from
Jun 16, 2015

Conversation

ChALkeR
Copy link
Member

@ChALkeR ChALkeR commented Jun 15, 2015

This one is trivial. I noticed it while reading the modules API documentation.

@ChALkeR ChALkeR added the doc Issues and PRs related to the documentations. label Jun 15, 2015
@Fishrock123
Copy link
Contributor

Mostly LGTM, but the proper language might be "relative path (i.e. /, ./, ../, etc)", since .. and . do also work.

@@ -145,7 +145,7 @@ A module prefixed with `'./'` is relative to the file calling `require()`.
That is, `circle.js` must be in the same directory as `foo.js` for
`require('./circle')` to find it.

Without a leading '/' or './' to indicate a file, the module is either a
Without a leading '/', './', or '../' to indicate a file, the module is either a
"core module" or is loaded from a `node_modules` folder.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated-but-nearby nit: If you're feeling like it, "core module" in the next line should really just be core module without any quotation marks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@ChALkeR
Copy link
Member Author

ChALkeR commented Jun 15, 2015

@Fishrock123 foo/bar might also be a relative path, but that's not relevant. It needs a better description then, possibly listing all corner cases.

But documenting .. and . requires changes in many places all over the modules API doc. Is that needed? Examples: modules.markdown#all-together, modules.markdown#loading-from-node_modules-folders

The purpose of this is to make the documentation at least consistent.

@Fishrock123
Copy link
Contributor

Yeah. LGTM.

@trevnorris
Copy link
Contributor

LGTM

PR-URL: nodejs#1983
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants