Skip to content

Commit

Permalink
feat(cli): allow to specify multiple rm patterns (#15)
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr authored and ph1p committed Feb 25, 2019
1 parent b1d267c commit 67a059a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmds/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ async function generate(argv) {
const docsFolder = `${argv.dist}/${codeFolder}`;
const title = argv.title;
const readme = argv.readme;
const rmPattern = argv.rmPattern || '';
const rmPattern = argv.rmPattern || [];

// remove docs folder, except README.md
const deletedPaths = await del([docsFolder + '/**/*', `!${docsFolder}/README.md`, rmPattern]);
const deletedPaths = await del([docsFolder + '/**/*', `!${docsFolder}/README.md`, ...rmPattern]);

/**
* Read all files in directory
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function main() {
alias: 'rm',
default: '',
desc: 'Pattern when removing files. You can ex- and include files. (glob pattern)',
type: 'string'
type: 'array'
},
jsDocConfigPath: {
alias: 'c',
Expand Down

0 comments on commit 67a059a

Please sign in to comment.