{"name":"babel-plugin-flow-comments","version":"1.0.1","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"},"scripts":{"build":"babel-plugin build","push":"babel-plugin publish","test":"babel-plugin test"},"keywords":["babel-plugin"],"gitHead":"ee95ffd6e38d0cac191edb1a4dc02ac694bf2cb1","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.1","_shasum":"65d0e6de896394a7b1f7c4e0764435c107d923d5","_from":".","_npmVersion":"2.9.0","_nodeVersion":"2.0.0","_npmUser":{"name":"sebmck","email":"sebmck@gmail.com"},"maintainers":[{"name":"sebmck","email":"sebmck@gmail.com"}],"dist":{"shasum":"65d0e6de896394a7b1f7c4e0764435c107d923d5","tarball":"http://registry-npm.ywwl.com/babel-plugin-flow-comments/download/babel-plugin-flow-comments-1.0.1.tgz","integrity":"sha512-/fI+sxtevveUdgUKkQQHJ/utyF+jcJu6k4cZnC5XjNpfiR2Sz+orqPUtrJa+GtuOp2Jgs18OdMuXtja3PC9Rlg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBxNcyhwBM/L+P+lDyTSxMiRtR2JBQbzbMAh80wXSLmQIhAIO+gARfRM/fdeWlwvevSx5nYwPDapAwqbHXSCvrpkdF"}],"size":902,"noattachment":false,"key":"/babel-plugin-flow-comments/-/babel-plugin-flow-comments-1.0.1.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":1434383842937,"_cnpm_publish_time":1434383842937,"dist-tags":{"latest":"6.3.19","stable":"6.3.19"}}