Squash merge of branch docs-v2.x into master

This commit is contained in:
Francisco Giordano
2019-07-23 15:54:12 -03:00
parent 2187fae154
commit 90831c8970
18 changed files with 194 additions and 144 deletions

19
scripts/gen-nav.js Normal file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env node
const path = require('path');
const proc = require('child_process');
const startCase = require('lodash.startcase');
const baseDir = process.argv[2];
const files = proc.execFileSync(
'find', [baseDir, '-type', 'f'], { encoding: 'utf8' }
).split('\n').filter(s => s !== '');
console.log('.API');
for (const file of files) {
const doc = file.replace(baseDir, '');
const title = path.parse(file).name;
console.log(`* xref:${doc}[${startCase(title)}]`);
}