Skip to content

Commit

Permalink
fixed correct remove of require-check
Browse files Browse the repository at this point in the history
  • Loading branch information
Joey van Dijk committed Mar 6, 2017
1 parent 913abdf commit 172a145
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions bin.js 100644 → 100755
Expand Up @@ -5,3 +5,23 @@
var pretty = require('./pretty')

module.exports = pretty

if (arg('-h') || arg('--help')) {
usage().pipe(process.stdout)
} else if (arg('-v') || arg('--version')) {
console.log(require('./package.json').version)
} else {
process.stdin.pipe(pretty({
timeTransOnly: arg('-t'),
levelFirst: arg('-l')
})).pipe(process.stdout)
}

function usage () {
return require('fs')
.createReadStream(require('path').join(__dirname, 'usage.txt'))
}

function arg (s) {
return !!~process.argv.indexOf(s)
}

0 comments on commit 172a145

Please sign in to comment.