{"name":"babel-plugin-apply-mdx-type-prop","version":"1.6.8","description":"Apply the MDX type prop used in the MDX pragma","repository":{"type":"git","url":"git+https://github.com/mdx-js/mdx.git"},"homepage":"https://mdxjs.com","bugs":{"url":"https://github.com/mdx-js/mdx/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"John Otander","email":"johnotander@gmail.com","url":"http://johnotander.com"},"contributors":[{"name":"JounQin","email":"admin@1stg.me","url":"https://www.1stg.me"}],"license":"MIT","keywords":["mdx","markdown","react","jsx","remark","babel"],"peerDependencies":{"@babel/core":"^7.10.5"},"dependencies":{"@babel/helper-plugin-utils":"7.10.4","@mdx-js/util":"^1.6.8"},"gitHead":"2771a52d912991d0d82ba6edfd618557073dc5f7","_id":"babel-plugin-apply-mdx-type-prop@1.6.8","_nodeVersion":"14.4.0","_npmVersion":"lerna/3.22.1/node@v14.4.0+x64 (darwin)","dist":{"integrity":"sha512-9aBcr0AGw+K7SXg54WUvskzgTmNeHiRUmv+5lbnCytbER676CC1daiIZrtx/j5OmgBOPHwvj39fcKKfPsYb74A==","shasum":"49ea48600de4157e9d3dbe1e36a5570cba57c8bd","tarball":"http://registry-npm.ywwl.com/babel-plugin-apply-mdx-type-prop/download/babel-plugin-apply-mdx-type-prop-1.6.8.tgz","fileCount":4,"unpackedSize":3962,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEKHgCRA9TVsSAnZWagAAojQP/3V83b1JknPAhhzQ0jnX\nHk7fnYS+MdYZI1ksm9DZP/x6TUtOeBGITXeV2R/U4D00AheNpqIDYkMIzZT/\nJE9Pi0k2O33EMeng20ha3HbEbr/HCDke9BiK2LKz9/T32P1Bz/awAIEoTSsk\nnoix3ihR/+BPpfMDpEb/c7WCo4APUJFjc/NZ4YflrQtw0PPrcV05GIU+usuU\npnSORdZ4534doUoJ0eVwzb29ybKnpiM20BcdqjlrkLUfykzROYdcrw2WaEZ7\nnHkC3BfhUEaAKLAeitkleZv8w09jTquS00DqiBeQW7yuzGob6qCfe1+5bHdj\n1u0bkqzlUbU8/8ZMQf1LXojCQdfl272xGl3ofCf3u6ISdwQcaWhnN3zjEy9c\nlyTt4y2dsaCcxtt6Fd3gDz4JjN2kaup36Ghh54hzvwk67iZJMdX/90hTKITS\njKkVsoMRrh/Dspecj1mt/6HnxleH7TVSqDjiQafp19gCHK57QscBgvMztxmM\nUJ0lE0BVDIcjZ0aUZubfd/G8RKq5tYKRVd5zRbt28TNMLN5f8p6KIgKfZGAZ\n8Hl/kw5sTfI252liKK3l07yNVN/hMzU9Q3mGVS/oINGwEM3Zc02hbQIcOHQI\ntJVSSER2QVpPoYfdRbcvjACHK+gEGJ8saVl7CdxNKxxLfe7HiFw/uNjTcwTF\ngJqo\r\n=jZac\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHoJi9pXcd1Knokvx06vfXEBvlhyY+CRN6pg6MY812yLAiAJYGWy8tcUTY6RCVLD7yjraZK3hn8ANTx2esJaE4Ln/Q=="}],"size":1992,"noattachment":false,"key":"/babel-plugin-apply-mdx-type-prop/-/babel-plugin-apply-mdx-type-prop-1.6.8.tgz"},"maintainers":[{"email":"johnotander@gmail.com","name":"johno"},{"email":"matija.marohnic@gmail.com","name":"silvenon"},{"email":"tim@timneutkens.nl","name":"timneutkens"},{"email":"tituswormer@gmail.com","name":"wooorm"}],"_npmUser":{"name":"johno","email":"johnotander@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-apply-mdx-type-prop_1.6.8_1594925536457_0.9928483893947087"},"_hasShrinkwrap":false,"readme":"# `babel-plugin-apply-mdx-type-prop`\n\nBabel plugin that applies the `mdxType` prop which is\nused by the [MDX](https://mdxjs.com) pragma.\n\nIt also stores all components encountered as `names` in\nthe plugin state.\n\n## Installation\n\n```sh\nyarn add babel-plugin-apply-mdx-type-prop\n```\n\n## Usage\n\n```js\nconst babel = require('@babel/core')\n\nconst BabelPluginApplyMdxTypeProp = require('babel-plugin-apply-mdx-type-prop')\n\nconst jsx = `\nexport const Foo = () => (\n  <div>\n    <Button />\n  </div>\n)\n\nexport default () => (\n  <>\n    <h1>Hello!</h1>\n    <TomatoBox />\n  </>\n)\n`\n\nconst plugin = new BabelPluginApplyMdxTypeProp()\n\nconst result = babel.transform(jsx, {\n  configFile: false,\n  plugins: ['@babel/plugin-syntax-jsx', plugin.plugin]\n})\n\nconsole.log(result.code)\nconsole.log(plugin.state.names)\n```\n\n### Input\n\n```js\nexport const Foo = () => (\n  <div>\n    <Button />\n  </div>\n)\n\nexport default () => (\n  <>\n    <h1>Hello!</h1>\n    <TomatoBox />\n  </>\n)\n```\n\n### Output\n\n```js\nexport const Foo = () => (\n  <div>\n    <Button mdxType=\"Button\" />\n  </div>\n)\n\nexport default () => (\n  <>\n    <h1>Hello!</h1>\n    <TomatoBox mdxType=\"Button\" />\n  </>\n)\n```\n\n## License\n\nMIT\n","publish_time":1594925536595,"_cnpm_publish_time":1594925536595,"dist-tags":{"ci":"1.6.13-ci.1","latest":"2.0.0","next":"2.0.0-next.8"}}