Skip to content

Commit

Permalink
docs: run the docs command (#1566)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith committed Jan 27, 2019
1 parent d1af168 commit d49aa49
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 2 additions & 3 deletions package.json
Expand Up @@ -22,9 +22,8 @@
"pretest": "npm run compile",
"prepare": "npm run compile",
"test": "nyc mocha build/test",
"docs": "echo your docs are in another castle 🏰",
"pregenerate-docs": "npm run build-tools",
"generate-docs": "node build/src/generator/docs",
"predocs": "npm run build-tools",
"docs": "node build/src/generator/docs",
"system-test": "mocha build/system-test",
"samples-test": "cd samples && npm link ../ && pwd && npm test",
"lint": "gts check && eslint 'samples/**/*.js'",
Expand Down
7 changes: 5 additions & 2 deletions src/generator/docs.ts
Expand Up @@ -37,10 +37,13 @@ const indexPath = path.join(__dirname, '../../../docs/index.html');
*/
async function main() {
const children = await readdir(apiPath);
const dirs = children.filter(x => !x.endsWith('.ts'));
const dirs = children.filter(x => {
return !x.endsWith('.ts') && !x.includes('dfareporting') &&
!x.includes('compute');
});
const contents = nunjucks.render(templatePath, {apis: dirs});
await writeFile(indexPath, contents);
const q = new Q({concurrency: 10});
const q = new Q({concurrency: 50});
console.log(`Generating docs for ${dirs.length} APIs...`);
let i = 0;
const promises = dirs.map(dir => {
Expand Down

0 comments on commit d49aa49

Please sign in to comment.