diff --git a/package.json b/package.json index 2dece76..53217cb 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/src/index.js b/src/index.js index a5f8892..6fd7af1 100644 --- a/src/index.js +++ b/src/index.js @@ -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;