diff --git a/docs/formatter.js b/docs/formatter.js new file mode 100644 index 0000000..4170566 --- /dev/null +++ b/docs/formatter.js @@ -0,0 +1,11 @@ +var jade = require('jade'); +var yaml = require('js-yaml'); + +module.exports = function(comments){ + for(var i in comments){ + comments[i].doc = yaml.safeLoad(comments[i].doc); + } + + var render = jade.compileFile('./template.jade'); + console.log(render({comments: comments})); +}; diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..6e45934 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,9 @@ +
Parse documentation information from the provided filename argument +
filename of the script you wish to parse
Available options: +- tolerant: try to keep parsing the file even if errors are encountered [default: true] +
a list of doc comments parsed from the source filename
Parse documentation information from the provided string content + +This function is also available under `docast.parse(contents, options)` +
string content to parse docs from
Available options: +- tolerant: try to keep parsing the file even if errors are encountered [default: true] +
a list of doc comments parsed from the source string contents