From 129e25926ae6b36b68a95dcda9ae3eeeaca65447 Mon Sep 17 00:00:00 2001 From: Crawl Date: Thu, 5 Sep 2019 11:45:23 +0200 Subject: [PATCH 1/2] refactor: allow custom globs --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; From 9c58620ea4fcdeda432a1370d4333e8537b37491 Mon Sep 17 00:00:00 2001 From: Crawl Date: Thu, 5 Sep 2019 11:47:57 +0200 Subject: [PATCH 2/2] fix: doc tests --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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" },