1 | ;
|
2 | var markdox = require('markdox');
|
3 |
|
4 | function generateDocs(options) {
|
5 | markdox.process(
|
6 | options.src,
|
7 | {output: options.output, template: options.template},
|
8 | function generationCallback(err/*, output */) {
|
9 | if (err) {
|
10 | console.error(err);
|
11 | } else {
|
12 | console.log('File `' + options.output + '` generated with success');
|
13 | }
|
14 | }
|
15 | );
|
16 | }
|
17 |
|
18 | generateDocs({
|
19 | src: './lib/index.js',
|
20 | output: './docs/api.md',
|
21 | template: './scripts/cycle-docs-template.md.ejs'
|
22 | });
|