Nikhil Yeole
Nikhil Yeole

Reputation: 19

View node.js source code on local machine

I have node.js installed on my mac. However I am not able to find the the source code.

The 'node' binary file is located /usr/local/bin however since its binary, I can not view it.

For example I want to see internal of console.log function.

On joyent github I can see the code but I want see it when I am offline via some editor like webstorm.

https://github.com/joyent/node/tree/master/lib

Can someone please help.

Thanks

Upvotes: 1

Views: 2510

Answers (2)

vodolaz095
vodolaz095

Reputation: 6986

In case of webstorm this link will help - http://www.jetbrains.com/webstorm/webhelp/node-js.html - see "Configuring Node core module sources"

Upvotes: 0

alandarev
alandarev

Reputation: 8635

Locally you have Node.js installed. To make your life easier, Node.js developers have already compiled Source into runnable Application.

Because you downloaded already compiled Node.js (that is OK, and sensible), you need to also download source-code if you want to access it offline.

Downloading source-code is just as easy, you can grab the latest code available at the same location as you specified: https://github.com/joyent/node. Look for "Download ZIP" button on the bottom right.

Upvotes: 3

Related Questions