|
| 1 | +# [doxdox](https://github.com/neogeek/doxdox) *1.0.0* |
| 2 | + |
| 3 | +> JSDoc to Bootstrap and Markdown documentation generator. |
| 4 | +
|
| 5 | + |
| 6 | +### lib/doxdox.js |
| 7 | + |
| 8 | + |
| 9 | +#### parseInput(input, config) |
| 10 | + |
| 11 | +Parse an input file with parser. |
| 12 | + |
| 13 | + parseInput('src/main.js', {'parser': 'dox'}).then(files => {}); |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | +##### Parameters |
| 19 | + |
| 20 | +- **input** `String` File to parse. |
| 21 | +- **config** `Object` Configuration object. |
| 22 | +- **config.parser** `String` String representing the parser to be used. |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | +##### Returns |
| 28 | + |
| 29 | + |
| 30 | +- `Object` Promise |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | +#### parseInputs(inputs, config) |
| 35 | + |
| 36 | +Parse array of directory globs and/or files, and then render the parsed data through the defined layout plugin. |
| 37 | + |
| 38 | + parseInputs(['src/main.js'], {'parser': 'dox', 'layout': 'markdown'}).then(content => {}); |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | +##### Parameters |
| 44 | + |
| 45 | +- **inputs** `Array` Array of directory globs and/or files. |
| 46 | +- **config** `Object` Configuration object. |
| 47 | +- **config.parser** `String` String representing the parser to be used. |
| 48 | +- **config.layout** `String` String representing the layout plugin to be used. |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | +##### Returns |
| 54 | + |
| 55 | + |
| 56 | +- `Object` Promise |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | +### lib/loaders.js |
| 62 | + |
| 63 | + |
| 64 | +#### loadParser(config) *private method* |
| 65 | + |
| 66 | +Load parser based on user defined choice. |
| 67 | + |
| 68 | + loadParser({'parser': 'dox'}).then(parser => {}); |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | +##### Parameters |
| 74 | + |
| 75 | +- **config** `Object` Configuration object. |
| 76 | +- **config.parser** `String` String representing the parser to be loaded. |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | +##### Returns |
| 82 | + |
| 83 | + |
| 84 | +- `Object` Promise |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | +#### loadPlugin(config) *private method* |
| 89 | + |
| 90 | +Load layout plugin based on user defined choice. |
| 91 | + |
| 92 | + loadPlugin({'layout': 'markdown'}).then(plugin => {}); |
| 93 | + loadPlugin({'layout': 'templates/README.hbs'}).then(plugin => {}); |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | +##### Parameters |
| 99 | + |
| 100 | +- **config** `Object` Configuration object. |
| 101 | +- **config.layout** `String` String representing the layout plugin to be loaded. |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | +##### Returns |
| 107 | + |
| 108 | + |
| 109 | +- `Object` Promise |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | +### lib/utils.js |
| 115 | + |
| 116 | + |
| 117 | +#### findPackageFileInPath([input]) |
| 118 | + |
| 119 | +Finds package.json file from either the directory the script was called from or a supplied path. |
| 120 | + |
| 121 | + console.log(findPackageFileInPath()); |
| 122 | + console.log(findPackageFileInPath('./package.json')); |
| 123 | + console.log(findPackageFileInPath('~/git/github/doxdox/')); |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | +##### Parameters |
| 129 | + |
| 130 | +- **input** `String` *Optional* Directory or file. |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | +##### Returns |
| 136 | + |
| 137 | + |
| 138 | +- `String` Path to package.json file. |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | +*Documentation generated with [doxdox](https://github.com/neogeek/doxdox).* |
0 commit comments