generate-docs
function to generate a documentation file from source files.
any jsdoc-style comment (starts with /**
) is extracted and concatenated into the output file.
example:
// docs.js const generateDocs = default; ;
<!-- readme.src.md --> # My Cool Project ## API <!-- TOC -->
// index.js /** * ## add * add(1, 2) // => 3 */ const add = a + b;
<!-- README.md --> # My Cool Project ## API <!-- toc --> * [add](#add) <!-- tocstop --> ## add add(1, 2) // => 3