-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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 builtin module in building.md #17705
Conversation
I feel like this documentation belongs in the building docs and not in the API docs. |
Thank you for your advice.Should I close this pr and open the other one? @Fishrock123 |
@Suixinlei You can just move the changes to |
2d48d8f
to
478d696
Compare
@joyeecheung done. I've updated the pr and the commit. |
BUILDING.md
Outdated
|
||
## Building Node.js with external core modules | ||
|
||
In general that core modules are only located in `lib/` folder. Node can |
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.
Thank you!
Some tiny fixes:
- that core modules -> those core modules.
- Node -> Node.js.
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.
@vsemozhetbyt Thanks a lot. I've already update my code.
ad10522
to
615f11a
Compare
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.
I think the commit message shouldn't include Fixes
since it's just a documentation changing. Maybe we can use Refs
instead.
BUILDING.md
Outdated
|
||
## Building Node.js with external core modules | ||
|
||
In general those core modules are only located in `lib/` folder. Node.js can |
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.
The word "those" here looks a bit unnatural since the core modules are not mentioned before this section, and the fact that they are in the lib/
folder is not entirely relevant here since the internal modules are not exposed to users. I would suggest something simpler like:
It is possible to specify one or more JavaScript text files to be bundled in the binary as builtin modules
when building Node.js.
BUILDING.md
Outdated
specify one or more JavaScript text files to be bundled in the binary as | ||
builtin modules. | ||
|
||
##### Unix / macOS |
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 don't really need these many levels here, I think ###
is enough.
BUILDING.md
Outdated
##### Unix / macOS | ||
|
||
```console | ||
$ ./configure --link-module '/root/myModule.js' |
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.
Can you add an explanation for this command? Maybe something like To make `/root/myModule.js` available via `require('root/myModule')`:
BUILDING.md
Outdated
##### Windows | ||
|
||
```console | ||
> .\vcbuild link-module './myModule.js' |
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.
Can you add an explanation for this command as well?
BTW this does not fix #12516 which was asking about the bundled native modules (addons), not the JS modules. |
Ping @Suixinlei |
sorry, I wll fix this asap. |
615f11a
to
f34ce3b
Compare
f34ce3b
to
922c53e
Compare
@joyeecheung thx for your advice, fix done. |
Landed in f2e62b5, thanks! |
Fixes: nodejs#12516 Refs: nodejs#2497 PR-URL: nodejs#17705 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Add builtin module doc in
BUILDING.md
and introduce--link-modules
in doc.Fixes: #12516
Refs: #2497
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
doc