{"name":"babel-plugin-apply-mdx-type-prop","version":"1.4.5","description":"Apply the MDX type prop used in the MDX pragma","license":"MIT","keywords":["mdx","markdown","react","jsx","remark","babel"],"homepage":"https://mdxjs.com","repository":{"type":"git","url":"git+https://github.com/mdx-js/mdx.git"},"bugs":{"url":"https://github.com/mdx-js/mdx/issues"},"author":{"name":"John Otander","email":"johnotander@gmail.com","url":"http://johnotander.com"},"devDependencies":{"@babel/core":"7.6.0","@babel/plugin-syntax-jsx":"7.2.0","jest":"24.9.0"},"dependencies":{"@babel/helper-plugin-utils":"7.0.0","@mdx-js/util":"^1.4.5"},"peerDependencies":{"@babel/core":"^7.0.0"},"scripts":{"test":"jest"},"jest":{"testEnvironment":"node"},"gitHead":"aecd7f57352ec413a91056ab21a4d74a4ca056a9","_id":"babel-plugin-apply-mdx-type-prop@1.4.5","_nodeVersion":"12.6.0","_npmVersion":"lerna/3.16.4/node@v12.6.0+x64 (darwin)","dist":{"integrity":"sha512-+lt3eel+QbJZJKP6/B1u0kKL7VJEM/v+np6m6IP9V2+DIune1BhWeN91NtfB/RKTko5v9GZ352CZgwjEA7AOXg==","shasum":"e58ae2f4d71c4227e09a991828e13e78384b7d2f","tarball":"http://registry-npm.ywwl.com/babel-plugin-apply-mdx-type-prop/download/babel-plugin-apply-mdx-type-prop-1.4.5.tgz","fileCount":4,"unpackedSize":3999,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddmszCRA9TVsSAnZWagAAAZkP/1MpPsPmtrRwpJhO9BRA\nmKP36ITcn/tEPgDGofeaipt4O6d2U14qM5QuZLciNhTEZ/24SwThktDgGSav\nhb2kj5rJS0NUExvKr8J7htkHRq7ncDaiQu2vW0JByPjhpBcZTmdNpnrfI8dl\n2G8XFBAeG1UZnAyNmpyduIGa9E7VgwoT5ih80EzYaAK0HuE/R6a8BiXd12xM\nXR14RHCf7+DtdTMBwhjlWMtA0kGZ3QAc4a+EM9Aq+das2w85IM150DQqYEOf\nafmcBTNhSrEvDKVOINZO3s9/TedOMeivAj06ps0Tb+R0jg24SBuil9H0yMt8\n6REgtUXhnGkWYCOxhYJ2WLo+1vBCl3TtQm0UBrxrIabGKW5+uHXfpJERKB3i\ngs6Q5U/OI9FURF1KYMhWSqBGmpQgUTs91H6C9mVHML//7F7DsA+Iwvncml1b\nQeZ6QjKVBnvQMJqC2oGIruaA5/YAnAQ+yHVCn8BWtZuz+S7uTTGROf7KcEIG\n0MaANJTgh19GFzK+dwVl6djTc/SV51BpdB3sibD3tu2tRG8pHiOhEEcN65Vj\nKfs5/IdNL5/iQfenRr1sxC0sNHDQH1kwgMs2KO1cmAjZOv8RxXq8FQn09Xyu\nBQfMJF9rFauOnkieYj6VDLqZ1xMfz00GIkk2bMzJRfF5InwYaIjgA1lfXVNM\nzL2k\r\n=3aoM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/3Vbtg5JPNWbY6YMC6uevhRZ799PTWhRqeR8WbXOdAgIhAPofMBLVoOglZuKX2bCdQDi4MjSeeK/wwjC1Lhdw4dT7"}],"size":1970,"noattachment":false,"key":"/babel-plugin-apply-mdx-type-prop/-/babel-plugin-apply-mdx-type-prop-1.4.5.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.4.5_1568041779280_0.9561143974304573"},"_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":1568041779421,"_cnpm_publish_time":1568041779421,"dist-tags":{"ci":"1.6.13-ci.1","latest":"2.0.0","next":"2.0.0-next.8"}}