-
To add a built-in module to the code, what code must be modified? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Suppose this guide will be helpful https://www.digitalocean.com/community/tutorials/how-to-create-a-node-js-modulev |
Beta Was this translation helpful? Give feedback.
-
Clone nodejs/node, add a If you're asking how that module could land on Node.js land, you would need to open a PR on this repo, adding docs, tests, and explanation why you think this module should be part of core. See https://github.com/nodejs/node/blob/HEAD/doc/guides/modules-in-core.md for more info. |
Beta Was this translation helpful? Give feedback.
Clone nodejs/node, add a
.js
file inlib/
folder, and runmake -j12
(depends on your OS/platform, see https://github.com/nodejs/node/blob/HEAD/BUILDING.md for further instructions): voilà. You would now have a node executable atout/Release/node
with the new built-in module you added.If you're asking how that module could land on Node.js land, you would need to open a PR on this repo, adding docs, tests, and explanation why you think this module should be part of core. See https://github.com/nodejs/node/blob/HEAD/doc/guides/modules-in-core.md for more info.