{"name":"babel-plugin-apply-mdx-type-prop","version":"1.6.20","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.20"},"gitHead":"45f761dfbf5dc41284177256f21f7b5322fcc5fe","_id":"babel-plugin-apply-mdx-type-prop@1.6.20","_nodeVersion":"14.15.0","_npmVersion":"lerna/3.22.1/node@v14.15.0+x64 (darwin)","dist":{"integrity":"sha512-ZfknQhEtTXYSimRn7n2+ZfxNs/SvjZ8WLHWWq4khwk3q/PW7OeL0pwLZH6NAHS5ihpyIPXMS37dQN1fpm66yxA==","shasum":"f05f95ba71773b7ef43a7d0e9131a3a616c3e37b","tarball":"http://registry-npm.ywwl.com/babel-plugin-apply-mdx-type-prop/download/babel-plugin-apply-mdx-type-prop-1.6.20.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\nwsFcBAEBCAAQBQJfprUvCRA9TVsSAnZWagAAxtkP/3imd3aCVbL+pc//HcmJ\nVN1anj/mCXwzM+jHHbYEhfL25qshdqEXK3anWOCz3PElxzEpYPa4G88VecrM\noXhiJdk08nWNCVbfKJq2Do93aF5KRfaj4Av5XAT5Ixi4xh5IQJl/lJoM8RCO\nYfNHBRblPLPgpdVkNkjltw4djyhRR+AXBvvbwaDI6S88NhwF5cdZl6U8MbzO\nbrSqFwedrezAfrR5rW+srDLVlTNm9QVUAg5MtYikTnH++pgqJNnF9Piwxkqf\nWl/ryM9PnbNeVLwsmA1RgQ/C8h9KNP5hUohwugfGv7y2n07cinLfSCj8iKU6\nsH/wN90oHhzxbFPMzzzK+SyMfcHQ2XWGb/yS971TxoGDmJddkfxsa9JE5C5D\ntsdliQBmzfPgTAiOb8XA/8r2RTWKGsgZskQyoEIH42NJlfsnDoBvmtEU/CKS\nSykCGls7lKf5wGdIRhijASguvh9zcu7R6zdvzNqJXO0HkTFyH57xBRnW6uhz\nS6IAdYujvbxMlz840VWViqGJgx0gc6hmeJbCybesMV+1wKI1EaoG/NHSeT42\n8nAc3icny5TybCQdkhS14KEmOfZdiXlyUCKkTplnk4uYytuSmyECTqXzwgC6\nZO4QuWL3vgRYiQKLaE5KzF3/qoG6np0OCalehth6YyX2w89kMT1j9s22gDAs\nKPm3\r\n=1nnw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHvv4DzoewsoLHZXCmlmFlORO2IDUzuJACCDPk/oioYVAiEAjU4AHgTTDnoYcwvluBGgF5HPNDdcqi2+gGizBNij5IM="}],"size":1991,"noattachment":false,"key":"/babel-plugin-apply-mdx-type-prop/-/babel-plugin-apply-mdx-type-prop-1.6.20.tgz"},"_npmUser":{"name":"johno","email":"johnotander@gmail.com"},"directories":{},"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-apply-mdx-type-prop_1.6.20_1604760878984_0.36212107772481694"},"_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":1604760879111,"_cnpm_publish_time":1604760879111,"dist-tags":{"ci":"1.6.13-ci.1","latest":"2.0.0","next":"2.0.0-next.8"}}