Add docopt

See more about docopt at http://docopt.org/
This is specific for the library at https://www.npmjs.com/package/docopt
This commit is contained in:
Giovanni Bassi
2015-10-14 21:48:57 -03:00
parent 3a6e1b8988
commit e43b2a00c0
2 changed files with 34 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
/// <reference path="docopt.d.ts" />
/// <reference path="../node/node.d.ts" />
var doc = `
Usage:
quick_example.coffee tcp <host> <port> [--timeout=<seconds>]
quick_example.coffee serial <port> [--baud=9600] [--timeout=<seconds>]
quick_example.coffee -h | --help | --version
`;
var {docopt} = require('docopt');
console.log(docopt(doc, { version: '0.1.1rc' }));