Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

usage with -h, updated readme

  • Loading branch information...
commit a16cc83fff2da3e87ad7ac360d0ad2096acf7c47 1 parent 95cde52
James Halliday authored
9 cmd.js → bin/cmd.js
View
@@ -1,6 +1,13 @@
#!/usr/bin/env node
-var rsa = require('./');
+var rsa = require('../');
var argv = require('optimist').argv;
+var fs = require('fs');
+
+if (argv.h || argv.help) {
+ return fs.createReadStream(__dirname + '/usage.txt')
+ .pipe(process.stdout)
+ ;
+}
rsa(argv, function (err, doc) {
if (err) {
8 bin/usage.txt
View
@@ -0,0 +1,8 @@
+usage: rsa-json OPTIONS
+
+ Generate a json blob with a new public and private key PEM in it.
+
+ OPTIONS
+
+ --bits=n number of bits to use for the modulus
+
2  package.json
View
@@ -4,7 +4,7 @@
"description" : "generate rsa keypairs as json blobs",
"main" : "index.js",
"bin" : {
- "rsa-json" : "cmd.js"
+ "rsa-json" : "bin/cmd.js"
},
"dependencies" : {
"optimist" : "~0.3.5"
6 readme.markdown
View
@@ -15,9 +15,13 @@ $ rsa-json
# usage
```
-usage: rsa-json
+usage: rsa-json OPTIONS
Generate a json blob with a new public and private key PEM in it.
+
+ OPTIONS
+
+ --bits=n number of bits to use for the modulus
```
Please sign in to comment.
Something went wrong with that request. Please try again.