Thursday 24 November 2016

How to make a command line tool using Node?

I am learning Node.js and I discovered that npm was written in it, so I decided to test making a command line tool too, just for the sake of learning. But I don't understand how was npm made using Node. I know that if you want to get arguments in a Node program you can just use the process.argv array. But how can I make a program that is available to be called in any folder without using npm, that can be used just by typing the name of the program?

Submitted November 24, 2016 at 07:17PM by Takegi

No comments:

Post a Comment