Skip to content

Commit

Permalink
feat: cmd option --noemoji
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Dec 5, 2024
1 parent 814f710 commit eafdef2
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ if (help !== undefined) {
console.log('--dest=<destination file> (default README.md)');
console.log('--repo=<GitHub repo URL>');
console.log('--types');
console.log('--noemoji');
return;
}

Expand Down Expand Up @@ -40,19 +41,26 @@ const repoUrl = process.argv.find((arg) => arg.indexOf('--repo=') > -1)?.replace

const types = process.argv.find((arg) => arg.indexOf('--types') > -1) !== undefined;

const noEmoji = process.argv.find((arg) => arg.indexOf('--noemoji') > -1) !== undefined;

if (!inputFiles || inputFiles.length === 0) {
throw new Error('No source file(s) provided.');
}

generateDocumentation({
inputFiles,
outputFile,
...(repoUrl !== undefined && {
buildOptions: {
buildOptions: {
...(repoUrl !== undefined && {
repo: {
url: repoUrl
},
types
}
})
}
}),
...(types && {types})
},
markdownOptions: {
...(noEmoji && {
emoji: null
})
}
});

0 comments on commit eafdef2

Please sign in to comment.