{"name":"babel-plugin-apply-mdx-type-prop","version":"1.6.9","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.9"},"gitHead":"5dab75ad754854143faa90181c86a1e7dab5a39b","_id":"babel-plugin-apply-mdx-type-prop@1.6.9","_nodeVersion":"14.4.0","_npmVersion":"lerna/3.22.1/node@v14.4.0+x64 (darwin)","dist":{"integrity":"sha512-qaItENUYZeoOz62E+VoUUtZFHUu6Ly5GGF+4NyFg565qTTd9qQ+RDalFJ3JkcK+U0u+2rPVc31XheObEGi/BYw==","shasum":"e4c08b35b476e90d65c61d53c088841aa3b313bc","tarball":"http://registry-npm.ywwl.com/babel-plugin-apply-mdx-type-prop/download/babel-plugin-apply-mdx-type-prop-1.6.9.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\nwsFcBAEBCAAQBQJfEN01CRA9TVsSAnZWagAAHX8P/A21Djgfn/es91bdiRGm\nvZme/QQHmtLx8VJLNbtiemjw4GNCxyKhoAA5/38C4u35Za6Wo6qbnSZU9rdp\nw4jh0Wva3Ia3ztVIrEU9QmGJ03StjlSZDiDfyQ4VQuEY1BIXt4EMEgESSB1E\nbFx2bDed/S73T9CKDWTk13HRfYdpAmqRgTeUHkw7G2AImjTGnjq4p9t6HKr3\nzwZ0o0wLq7gP2Ze4Yw/JL4mxXRttQpwoL65XrsjJ+8F3ZqNtDJNzPh0zxzoy\nj7ncnCIalpSwW1mFHPXc2H2zPm9gbj0NWCwJ7jjFJbvYLeK0Isj58A5OaqaV\nEqQ20FrugPKNqifFx3fZM6O6228s95WPtIZBgCNwFEbIrNW1ijd3Kufar265\n4DED08vGMhVh2pEAo58Rkc5UBiwOR4d/yZVXlqP45wlfk7DlwYdTd/jyS5x+\neJn+Ap2Kr0JOSJg76Ii128yci1gfeC54WrWOPmODpuv1AfIV9YkamADEIHgA\n+CQ/FIzqMSLUEqLFJr91sDOZu+tKTRu4oer3g9rJeCSG2sot2LLDS1vBf73x\nv78XAbWsDlZSz/cSrCN8h6TrVfZ07hBQ8Z+WMShGbnmf2XfhdH/i69W8Zbmu\nboZrCNYdvSlz8IwrHcAbp/EOSANGkV52CWBZNI8eULh3oJk5hrXR2o3zzHtz\nT1ob\r\n=S3A7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBCwuNWsSAv6jLCCvw5HQCAD/5TmEjw0sv/Cdw0mzHPXAiEA/39gXmCd3SA3j/qDMdxjb54SfT+mLBbHhBpJNUkXglE="}],"size":1991,"noattachment":false,"key":"/babel-plugin-apply-mdx-type-prop/-/babel-plugin-apply-mdx-type-prop-1.6.9.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.9_1594940725143_0.6338794843251294"},"_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":1594940725282,"_cnpm_publish_time":1594940725282,"dist-tags":{"ci":"1.6.13-ci.1","latest":"2.0.0","next":"2.0.0-next.8"}}