{"name":"babel-plugin-apply-mdx-type-prop","version":"1.6.19","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.11.6"},"dependencies":{"@babel/helper-plugin-utils":"7.10.4","@mdx-js/util":"1.6.19"},"gitHead":"a4fb84aa824b66545eacc60c50beef52f7d848f7","_id":"babel-plugin-apply-mdx-type-prop@1.6.19","_nodeVersion":"10.22.0","_npmVersion":"lerna/3.22.1/node@v10.22.0+x64 (darwin)","dist":{"integrity":"sha512-zAuL11EaBbeNpfTqsa9xP7mkvX3V4LaEV6M9UUaI4zQtTqN5JwvDyhNsALQs5Ud7WFQSXtoqU74saTgE+rgZOw==","shasum":"423792e9f7cd06e5b270e66c661ac9e454cdb4fe","tarball":"http://registry-npm.ywwl.com/babel-plugin-apply-mdx-type-prop/download/babel-plugin-apply-mdx-type-prop-1.6.19.tgz","fileCount":4,"unpackedSize":3963,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfj1t7CRA9TVsSAnZWagAAhL0QAIZngjzxMZ8v6EQUrFGy\njN6Zm1XlQH4tQ4He4ZrfIUwJaD3N2VnWvR+VIvBYOaW6zRXRofFHFAzHtoLB\nACZh/69uwERD7Sw0x2OTseFdv/2Q/r2oM0rUPvQ0Jzu+4ZjgwaCa04fKdYay\nu3WfxdhnpxNDCyD5VtD5T3BK5EWRcZZVMex5Rl1RukvdbOW+Fi7HaWuoAxzk\nHDxedGImjEPX0zdRE01iuDRiL228cv4obwaSrY+v2P1hjK2lmut1ynPgVG+8\nd25qaseyEv4RTTbvkDgZRz9lSK3WcfayGvFvEUotxZyxnJCcuRoEZioTIvOF\nFdnZM7Dc1FGdWKFhu8eumy9FFROGxr/FPEa8e1WhhskWYMKUpVzBEC2guIzq\nHDqrzBEvfceBWmVC5GVFmklNqwnITsTJEllQXOLAnpR6o9jLQmIVyDzRoctL\nJFLcYkQ7pyGwdKm8DieLRoUR5fcxYCeo0xWGrtUt8TAMOwdThuCLf8vk526l\nPi86UEcDaM5ql9hCsKOx+37zL3PSBYhbaHKY+02TlpuUhyMTtnAxVpga7xtu\noUAQaVW64TubrvFi5taYCi3CjZYe1Jvqj+w9H/sWIqBrW//0sMv5ANhkLdwh\nfNzGKbo3QbG9sAtXieKJqPP7XS/xS5KRtN6xYVutCG/LItzpdzyjgFxkwSRF\nV1dN\r\n=hJ2X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDh7NBI6mGvh2ldWqhBD53lMaDROr5wxF/DgWHnjVDrawIgM4QJBVAcaTHqnC73XQ1/aXKJgC/ACBq6yku1+kqbfkQ="}],"size":1993,"noattachment":false,"key":"/babel-plugin-apply-mdx-type-prop/-/babel-plugin-apply-mdx-type-prop-1.6.19.tgz"},"maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"},{"name":"timneutkens","email":"tim@timneutkens.nl"},{"name":"silvenon","email":"matija.marohnic@gmail.com"},{"name":"johno","email":"johnotander@gmail.com"}],"_npmUser":{"name":"johno","email":"johnotander@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-apply-mdx-type-prop_1.6.19_1603230586825_0.6501313442537664"},"_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":1603230586954,"_cnpm_publish_time":1603230586954,"dist-tags":{"ci":"1.6.13-ci.1","latest":"2.0.0","next":"2.0.0-next.8"}}