This generator helps you to create a node.js module including nodeunit unit tests and is based of grunt-init-node, authored by the
magnificent GruntJS team.
Let’s get started :
First up, if you still haven’t installed Yeoman, please go through the Gettng-Started wiki!
Assuming you have got Yeoman up and running, let’s paw at node generator!
npm install -g generator-node # Install the generator.
I shall call the sample node package as exmp
mkdir exmp && cd $_
Now the magic happens ;) You just need to fill in the required details and the project’s scaffold.
The name of your project shouldn't contain "node" or "js" and
should be a unique ID not already in use at search.npmjs.org.
[?] Module Name: exmp
[?] Description: The best module ever.
[?] License: MIT
[?] GitHub username:
[?] Author's Name:
[?] Author's Email:
[?] Author's Homepage:
Digging deeper, we can notice the below dir struct, along with node_modules: