Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

refactor: allow custom globs #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"docgen": "src/index.js"
},
"scripts": {
"test": "eslint src && node src --source test/src --custom test/docs/index.yml --output test/docs/docs.json --spaces 2",
"test:docs": "node src --source test/src --custom test/docs/index.yml --output test/docs/docs.json --spaces 2",
"test": "eslint src && node src --source test/src/*.js test/src/**/*-js --custom test/docs/index.yml --output test/docs/docs.json --spaces 2",
"test:docs": "node src --source test/src/*.js test/src/**/*.js --custom test/docs/index.yml --output test/docs/docs.json --spaces 2",
"lint": "eslint src",
"lint:fix": "eslint --fix src"
},
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const mainPromises = [null, null];
// Parse the JSDocs in all source directories
console.log('Parsing JSDocs in source files...');
const files = [];
for(const dir of config.source) files.push(`${dir}/*.js`, `${dir}/**/*.js`);
for(const glob of config.source) files.push(glob);
mainPromises[0] = jsdoc2md.getTemplateData({ files, configure: config.jsdoc }).then(data => {
console.log(`${data.length} JSDoc items parsed.`);
return data;
Expand Down