processes javascript files creating markdown documentation from comments. Edit head.txt and foot.txt to customize the generated README.md file
Requires: module:fs
, module:jsdoc-to-markdown
, module:package.json
Author: Jimmy Doughten https://github.com/dough10
- make-docs.js
- ~writeFile(name, md) ⇒
Promise.<String>
- ~renderDoc(filename) ⇒
Void
- ~dependencies() ⇒
String
- ~devDependencies() ⇒
String
- ~processDocs() ⇒
String
- ~hulkSmash() ⇒
String
- ~writeFile(name, md) ⇒
save a file
Kind: inner method of make-docs.js
Returns: Promise.<String>
- string confirming successful file save
Param | Type | Description |
---|---|---|
name | String |
filename |
md | String |
text content to be writen to file |
Example (Example usage of writeFile() function.)
writeFile('awesomefile-doc.md', '# Awesome File').then(console.log);
// returns `awesomefile-doc.md saved to disk`
// awesomefile-doc.md contains '# Awesome File'
renders a markdown document file from javascript comments
Kind: inner method of make-docs.js
Returns: Void
- nothing
Param | Type | Description |
---|---|---|
filename | String |
name of the file being processed |
Example (Example usage of renderDoc() function.)
renderDoc('awesomefile.js');
output dependencies from package.json to markdown unindexed list
Kind: inner method of make-docs.js
Returns: String
- list of dependencies
Example (Example usage of dependencies() function.)
let dep = dependencies();
output dev dependencies from package.json to markdown unindexed list
Kind: inner method of make-docs.js
Returns: String
- list of dev dependencies
Example (Example usage of devDependencies() function.)
let dev = devDependencies();
parse through files array and generate docs.
Kind: inner method of make-docs.js
Returns: String
- list of files
Example (Example usage of processDocs() function.)
let processedDocs = processDocs();
call all functions and smash their outputs into 1 string
Kind: inner method of make-docs.js
Returns: String
- README.md contents
Example (Example usage of hulkSmash() function.)
writeFile('README.md', hulkSmash()).then(console.log);
// outputs 'README.md saved to disk'