{"name":"babel-plugin-flow-comments","version":"1.0.9","description":"Turn flow type annotations into comments","repository":{"type":"git","url":"https://github.com/babel-plugins/babel-plugin-flow-comments"},"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":"0a321f36c446904ed06410430f2d4ae896f2046d","bugs":{"url":"https://github.com/babel-plugins/babel-plugin-flow-comments/issues"},"homepage":"https://github.com/babel-plugins/babel-plugin-flow-comments","_id":"babel-plugin-flow-comments@1.0.9","_shasum":"d6cd6df0ef155bd8bc4c51bf713a7b2b54c080c4","_from":".","_npmVersion":"2.7.1","_nodeVersion":"1.6.1","_npmUser":{"name":"sebmck","email":"sebmck@gmail.com"},"maintainers":[{"name":"sebmck","email":"sebmck@gmail.com"},{"name":"hzoo","email":"hi@henryzoo.com"}],"dist":{"shasum":"d6cd6df0ef155bd8bc4c51bf713a7b2b54c080c4","tarball":"http://registry-npm.ywwl.com/babel-plugin-flow-comments/download/babel-plugin-flow-comments-1.0.9.tgz","integrity":"sha512-eM6KUAd4KixVrn19N+fkx2Qd1lfSvTAgmSOFrDyWP59vQDjBAKG7Bu8CBr4I9Ehbcjz3vaCOuvYhpowtMwXolw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5OqfyaEfXYhUCFTBxsmxmy3xYdmWBsOefl58VwXxHkgIgNp4hwsN56ns34UDX/vAIM22Y8WQL19Ex+mWXWbqjoYc="}],"size":3011,"noattachment":false,"key":"/babel-plugin-flow-comments/-/babel-plugin-flow-comments-1.0.9.tgz"},"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":1437775277482,"_cnpm_publish_time":1437775277482,"dist-tags":{"latest":"6.3.19","stable":"6.3.19"}}