1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
From: =?utf-8?q?Bastien_ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Tue, 22 Aug 2017 14:46:56 +0200
Subject: Support a --help option
forwarded: yes, https://github.com/lyroyce/mocha-tap-reporter/issues/5
bug: https://github.com/lyroyce/mocha-tap-reporter/issues/5
---
index.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.js b/index.js
index b9623d7..7a626a5 100755
--- a/index.js
+++ b/index.js
@@ -91,7 +91,7 @@ reporter. (Note that some reporters write to files instead of stdout.)
if (require.main === module) {
var type = process.argv[2]
- if (!type)
+ if (!type || type == '--help' || type == '-h')
return usage()
process.stdin.pipe(new Formatter(type))
|