Skip to content

Commit

Permalink
fix(exclude): remove empty string from exclude array
Browse files Browse the repository at this point in the history
closes #43
  • Loading branch information
ph1p committed Aug 1, 2021
1 parent caa632c commit 81e9a71
Show file tree
Hide file tree
Showing 6 changed files with 5,779 additions and 14,978 deletions.
17 changes: 0 additions & 17 deletions .release-it.json

This file was deleted.

12 changes: 7 additions & 5 deletions cmds/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const addToStatistics = (file, status, isFolder = false) => {
* @param {object} argv passed arguments
*/
async function generate(argv) {
const exclude = (argv.exclude && argv.exclude.split(',')) || [argv.exclude || ''];
const exclude = ((argv.exclude && argv.exclude.split(',')) || [argv.exclude || null]).filter(Boolean);
const srcFolder = argv.source;
const codeFolder = argv.folder;
const docsFolder = `${argv.dist}/${codeFolder}`;
Expand Down Expand Up @@ -290,10 +290,12 @@ async function generate(argv) {
const resultTime = (Math.abs(startTime - +new Date()) / 1000).toFixed(2);

// get longest type string
const maxExtLength = Object.keys(statistics).length ? Math.max.apply(
null,
Object.keys(statistics).map(w => w.length)
) : 0;
const maxExtLength = Object.keys(statistics).length
? Math.max.apply(
null,
Object.keys(statistics).map(w => w.length)
)
: 0;

console.log(`\n${Array(maxExtLength).join('-')}`);

Expand Down
Loading

0 comments on commit 81e9a71

Please sign in to comment.