Skip to content

Commit

Permalink
Add --ignore/-i option (in addition to package config)
Browse files Browse the repository at this point in the history
  • Loading branch information
vweevers committed Aug 9, 2019
1 parent 63979e3 commit b6011c2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const argv = require('subarg')(process.argv.slice(2), {
},
alias: {
h: 'help',
v: 'version'
v: 'version',
i: 'ignore'
}
})

Expand All @@ -33,8 +34,9 @@ if (argv.help) {
const glob = argv._.length ? argv._ : ['*.md']
const configKey = 'hallmark'
const packageOpts = pkgConfig(configKey, { root: false, cwd }) || {}
const ignore = [].concat(argv.ignore || [])

deglob(glob, { configKey, cwd }, function (err, files) {
deglob(glob, { configKey, cwd, ignore }, function (err, files) {
if (err) throw err
if (files.length === 0) process.exit()

Expand Down

0 comments on commit b6011c2

Please sign in to comment.