Simple project
Let’s say, you have just created a new npm-module, but you have not created a README yet. This is how your project looks like:
example-project-1-simple
├── index.js
└── package.json
package.json
{
"name": "example-project-1-simple",
"version": "1.0.0",
"description": "An example to show what thought generates on with the vanilla template.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "MIT"
}
index.js
/**
* Multiplies two numbers
* @param {number} a the first number
* @param {number} b the second number
* @return {number} the product of `a` and `b`
* @module example-project
* @public
*/
module.exports = function multiply(a, b) {
return a * b
}
Result
Thought will create a README.md-file and a CONTRIBUTING.md-file.
After running thought run -a
, the project will look like this. Click on the tree to see the file contents:
example-project-1-simple
├── CONTRIBUTING.md
├── README.md
├── index.js
└── package.json