{"name":"babel-plugin-flow-comments","version":"1.0.4","description":"Turn flow type annotations into comments","repository":{"type":"git","url":"git+https://github.com/babel-plugins/babel-plugin-flow-comments.git"},"license":"MIT","main":"lib/index.js","devDependencies":{"babel":"^5.6.0","mocha":"^2.2.5"},"scripts":{"build":"babel-plugin build","push":"babel-plugin publish","test":"babel-plugin test","test-mocha":"mocha --compilers js:babel/register"},"keywords":["babel-plugin"],"gitHead":"b1a40c7a510ebdac7806e01cdf3707ae71466af8","bugs":{"url":"https://github.com/babel-plugins/babel-plugin-flow-comments/issues"},"homepage":"https://github.com/babel-plugins/babel-plugin-flow-comments#readme","_id":"babel-plugin-flow-comments@1.0.4","_shasum":"2625462ed3bc818561882b63057eab8424a87f0e","_from":".","_npmVersion":"2.12.0","_nodeVersion":"0.10.38","_npmUser":{"name":"hzoo","email":"hi@henryzoo.com"},"dist":{"shasum":"2625462ed3bc818561882b63057eab8424a87f0e","tarball":"http://registry-npm.ywwl.com/babel-plugin-flow-comments/download/babel-plugin-flow-comments-1.0.4.tgz","integrity":"sha512-g4qGW6D0OtDE+6aaT9ps53jakKWm1tTzXbA1i5pwi0FzbZsjPEaNaetRHEUWqknQfvSDvxJNWXqPfG1b6cPiyw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQnVvXWrCXlFH0mQDyV7IIv2lbBlyMgtqLtXkyXd3wqAIhAODMVdNt9zubRc8KZjxLI1AvlzMt5b5zxhXy6xRAeWPE"}],"size":2103,"noattachment":false,"key":"/babel-plugin-flow-comments/-/babel-plugin-flow-comments-1.0.4.tgz"},"maintainers":[{"name":"sebmck","email":"sebmck@gmail.com"},{"name":"hzoo","email":"hi@henryzoo.com"}],"directories":{},"readme":"# babel-plugin-flow-comments\n\nTurn flow type annotations into comments.\n\nWhen using this plugin, you might want to also blacklist the `flow` transformer to preserve the `/* @flow */` directive.\n\nhttp://flowtype.org/blog/2015/02/20/Flow-Comments.html\n\n## Example\n\n**In**\n\n```javascript\nfunction foo(bar?) {}\nfunction foo2(bar?: string) {}\nfunction foo(x: number): string {}\ntype B = {\n  name: string;\n};\nexport type GraphQLFormattedError = number;\nimport type A, { B, C } from './types';\nimport typeof D, { E, F } from './types';\n```\n\n**Out**\n\n```javascript\n\"use strict\";\n\nfunction foo(bar /*:: ?*/) {}\nfunction foo2(bar /*:: ?: string*/) {}\nfunction foo(x /*: number*/) /*: string*/ {}\n/*:: type B = {\n  name: string;\n};*/\n/*:: export type GraphQLFormattedError = number;*/\n/*:: import type A, { B, C } from './types';*/\n/*:: import typeof D, { E, F } from './types';*/\n```\n\n## Installation\n\n```sh\n$ npm install babel-plugin-flow-comments\n```\n\n## Usage\n\n### Via `.babelrc` (Recommended)\n\n**.babelrc**\n\n```json\n{\n  \"plugins\": [\"flow-comments\"],\n  \"blacklist\": [\"flow\"]\n}\n```\n\n### Via CLI\n\n```sh\n$ babel --plugins flow-comments --blacklist flow script.js\n```\n\n### Via Node API\n\n```javascript\nrequire(\"babel-core\").transform(\"code\", {\n  plugins: [\"flow-comments\"],\n  blacklist: [\"flow\"]\n});\n```\n","publish_time":1436278172497,"_cnpm_publish_time":1436278172497,"dist-tags":{"latest":"6.3.19","stable":"6.3.19"}}