github
|
|
github
ConfigurationDockit relies on a json5 configuration file to tell it how to parse a project |
|
|
project: Project name github: url and text to display for github repo link assets: an array of filenames in the project to copy to the favicon: filename to use for favicon. Original image should be an entry in above assets config files: a series of glob matches to indicate which files to parse glob matches are specified in separate properites. These namings are arbitrary and exist to allow finer control over order by grouping ctypes: an array of comment types to ignore (display as comments in the code sections, instead of pulling out and parsing with markdown). Supported comment types: ignores: any comments that should be treated as execptions to the above matching based on a simple substring match of the start of a line (singleline only supported) all: boolean whether to generate the all page, generated by default. Otherwise
the top level project index: remap the index page to another generated html page. By default, with all set to true, this will point to the all page. allHash: add an optional hash to the url for the all page (to link to an anchor) |
|
| github |
|
Dockit LibRequire the necessary libraries. Actual file parsing for code and comments is handled by the noddocco lib. A marked instance is configured tp parse strings as markdown
using github flavored markdown, passing code highlight
callbacks to ejstpl loads and compiles all templates used to generate HTML files. |
|
Process files and generate documentationA config object passed to the dockit function contains a glob match for all the files to be processed. These matches can be split into sections allowing for finer control over the order in which files are processed and then displayed. For each file in the match, it's name is used to generate a key that will serve as the genrated filename (with directory slashes replaced with dashes). Any markdown files are treated as a special case - with Other files are passed to |
|
Write the documentation to disk With the noddocco data generated for each file. Loop through the files and
write their contents to disk.
By default, alongised individual file pages, Dockit will create a page which is all
the files processed into one, long html page. This page will be the As the files are written to disk the progress is sent to the console. |
|