{"name":"fdocopt","version":"0.1.2","homepage":"https://github.com/valeriangalliat/fdocopt","bugs":{"url":"https://github.com/valeriangalliat/fdocopt/issues"},"license":{"type":"Unlicense","url":"http://unlicense.org/"},"author":{"name":"Valérian Galliat","url":"http://val.codejam.info/"},"repository":{"type":"git","url":"https://github.com/valeriangalliat/fdocopt.git"},"scripts":{"test":"eslint index.js"},"dependencies":{"docopt":"0.*"},"devDependencies":{"eslint":"0.*"},"gitHead":"dd6c4f0750c20b7ac942f4c633b6c7eeb5ba9c66","description":"fdocopt =======","_id":"fdocopt@0.1.2","_shasum":"d7c3400f1089fc3ae766322ab68c8872844e8bfc","_from":".","_npmVersion":"2.1.3","_nodeVersion":"0.10.32","_npmUser":{"name":"valeriangalliat","email":"vava720@gmail.com"},"maintainers":[{"name":"valeriangalliat","email":"vava720@gmail.com"}],"dist":{"shasum":"d7c3400f1089fc3ae766322ab68c8872844e8bfc","tarball":"http://registry-npm.ywwl.com/fdocopt/download/fdocopt-0.1.2.tgz","integrity":"sha512-WPyIqJn2EQ4ZSPmuhLIqXe3roJU9+jMt0S9GfdENJ1wtK1Vzfu+m4oixHVofgtS7fuN6ter9CkkFrE3CdJ39Pw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBjqW+i0Ne4G5GzNLeG/OZYnKhdFTkgRK4dg/pTBUliUAiBeYoznx0S6aSVzXrsP1elqnF3EkxxsNw8cPzKvYsk8tg=="}],"size":2053,"noattachment":false,"key":"/fdocopt/-/fdocopt-0.1.2.tgz"},"directories":{},"readme":"# fdocopt [![npm version](http://img.shields.io/npm/v/fdocopt.svg?style=flat-square)](https://www.npmjs.org/package/fdocopt)\n\n> File decorator for [docopt] option parser.\n\n[docopt]: https://github.com/docopt/docopt.coffee\n\nDescription\n-----------\n\nIt's not easy to work with docopt in pure JavaScript since, unlike\nPython and CoffeeScript, there's no simple way to define a multiline\nstring to contain the usage string.\n\nThis package provides a decorator for docopt to solve this problem.\n\n```js\n/*\nUsage: hello [options] <world>\n\nArguments:\n  <world>  Hello world!\n\nOptions:\n  -h, --help  Show this help.\n  --version   Show version.\n  --happy     Be happy.\n*/\n\nvar docopt = require('fdocopt')();\n```\n\nBy default it will decorate the global docopt instance, so the above is\nthe same as:\n\n```js\nvar docopt = require('fdocopt')(require('docopt').docopt);\n```\n\nThen, pass the documented filename instead of the usage string:\n\n```js\nvar args = docopt(__filename);\n```\n\nYou can also use the internal functions to extract the comment block\nfrom a file or a code buffer:\n\n```js\nvar doc = require('fdocopt').extract(__filename);\nvar doc = require('fdocopt').extractBuffer('/** Usage: hello */');\n```\n","publish_time":1412539042300,"_cnpm_publish_time":1412539042300,"dist-tags":{"latest":"0.1.3"}}