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: add docs for module.paths #14435

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion doc/api/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,15 @@ added: v0.1.16

The module that first required this one.

### module.paths
<!-- YAML
added: v0.4.0
-->

* {string[]}

The search paths for the module.
Copy link
Member

Choose a reason for hiding this comment

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

This is a bit terse. Perhaps expand the explanation just a bit?

Copy link
Contributor

@refack refack Jul 25, 2017

Choose a reason for hiding this comment

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

I agree that a few more words should be added. Maybe also a link to the parts about module resolution.
@atever would you like to submit another PR?


### module.require(id)
<!-- YAML
added: v0.5.1
Expand All @@ -791,4 +800,4 @@ be explicitly exported in order to be used.
[`path.dirname()`]: path.html#path_path_dirname_path
[exports shortcut]: #modules_exports_shortcut
[module resolution]: #modules_all_together
[native addons]: addons.html
[native addons]: addons.html
Copy link
Contributor

@vsemozhetbyt vsemozhetbyt Jul 23, 2017

Choose a reason for hiding this comment

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

cc @nodejs/documentation
This diff appears because we did not have a line break in this last line previously. Maybe it is worth to set some rule for this when doc linting is landed.