doxdox 3.0.0
JSDoc to Markdown, Bootstrap, and custom Handlebars template documentation generator.
Parse a file with custom parser.
parseFile('src/main.js', {'parser': 'dox'}).then(files => {});
Name | Type | Description | |
---|---|---|---|
input | String |
File to parse. | |
config | Object |
Configuration object. | |
config.parser | String |
String representing the parser to be used. |
Object
Promise
Parse array of files, and then render the parsed data through the defined layout plugin.
parseFiles(['src/main.js'], {'ignore': [], 'parser': 'dox', 'layout': 'markdown'}).then(content => {});
Name | Type | Description | |
---|---|---|---|
inputs | Array |
Array of directory globs and/or files. | |
config | Object |
Configuration object. | |
config.ignore | String |
Array of paths to ignore. | |
config.parser | String |
String representing the parser to be used. | |
config.layout | String |
String representing the layout plugin to be used. |
Object
Promise
Parse array of directory globs and/or files, and then render the parsed data through the defined layout plugin.
parseInputs(['src/*.js'], {'ignore': [], 'parser': 'dox', 'layout': 'markdown'}).then(content => {});
Name | Type | Description | |
---|---|---|---|
inputs | Array |
Array of directory globs and/or files. | |
config | Object |
Configuration object. | |
config.ignore | String |
Array of paths to ignore. | |
config.parser | String |
String representing the parser to be used. | |
config.layout | String |
String representing the layout plugin to be used. |
Object
Promise
Find which node_modules directory to load package from.
findPackagePath('doxdox-parser-dox').then(parser => {});
findPackagePath('doxdox-plugin-bootstrap').then(plugin => {});
Name | Type | Description | |
---|---|---|---|
pkg | String |
Package name as string. |
Object
Promise
Load parser based on user defined choice.
loadParser({'parser': 'dox'}).then(parser => {});
loadParser({'parser': 'parser.js'}).then(parser => {});
Name | Type | Description | |
---|---|---|---|
config | Object |
Configuration object. | |
config.parser | String |
String representing the parser to be loaded. |
Object
Promise
Load layout plugin based on user defined choice.
loadPlugin({'layout': 'markdown'}).then(plugin => {});
loadPlugin({'layout': 'templates/README.hbs'}).then(plugin => {});
loadPlugin({'layout': 'plugin.js'}).then(plugin => {});
Name | Type | Description | |
---|---|---|---|
config | Object |
Configuration object. | |
config.layout | String |
String representing the layout plugin to be loaded. |
Object
Promise
Finds package.json file from either the directory the script was called from or a supplied path.
console.log(findPackageFileInPath());
console.log(findPackageFileInPath('./package.json'));
console.log(findPackageFileInPath('~/git/github/doxdox/'));
Name | Type | Description | |
---|---|---|---|
input | String |
Directory or file. | Optional |
String
Path to package.json file.
Format an array of directories and/or files to be ignored by globby by adding a "!" at the beginning of each path.
console.log(formatPathsArrayToIgnore(['./src']));
Name | Type | Description | |
---|---|---|---|
paths | Array |
Array of directories and/or files. |
Array
Modified array of directories and/or files.
Sets default configuration values.
console.log(setConfigDefaults({}));
Name | Type | Description | |
---|---|---|---|
config | Object |
Custom configuration object. |
Object
Modified configuration object.
Documentation generated with doxdox.