Permalink
Browse files

usage with -h, updated readme

  • Loading branch information...
1 parent 95cde52 commit a16cc83fff2da3e87ad7ac360d0ad2096acf7c47 @substack committed Nov 7, 2012
Showing with 22 additions and 3 deletions.
  1. +8 −1 { → bin}/cmd.js
  2. +8 −0 bin/usage.txt
  3. +1 −1 package.json
  4. +5 −1 readme.markdown
@@ -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) {
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
+
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"
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
```

0 comments on commit a16cc83

Please sign in to comment.