Skip to content

Latest commit

 

History

History
executable file
·
96 lines (76 loc) · 3.72 KB

make-docs-doc.md

File metadata and controls

executable file
·
96 lines (76 loc) · 3.72 KB

make-docs.js

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>

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'

make-docs.js~renderDoc(filename) ⇒ Void

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');

make-docs.js~dependencies() ⇒ String

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();

make-docs.js~devDependencies() ⇒ String

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();

make-docs.js~processDocs() ⇒ String

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();

make-docs.js~hulkSmash() ⇒ String

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'