We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b88517 commit 2948ecfCopy full SHA for 2948ecf
cli.js
@@ -0,0 +1,14 @@
1
+#!/usr/bin/env node
2
+
3
+var gh = require('./');
4
5
+if (!process.argv[2]) {
6
+ process.stderr.write('Error: URL must be provided as first argument\n');
7
+ process.exit(1);
8
+}
9
+var res = gh(process.argv[2]);
10
+if (res == null) {
11
+ process.stderr.write('Error: Invalid parameter: ' + process.argv[2] + '\n');
12
13
14
+process.stdout.write(JSON.stringify(res, null, 2) + '\n');
package.json
@@ -21,6 +21,9 @@
21
"files": [
22
"index.js"
23
],
24
+ "bin": {
25
+ "parse-github-url" : "./cli.js"
26
+ },
27
"main": "index.js",
28
"engines": {
29
"node": ">=0.10.0"
0 commit comments