{"name":"babel-plugin-apply-mdx-type-prop","version":"1.6.12","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.12"},"gitHead":"16c21cfacb770b73bfbd68b384d32895a8bc0d86","_id":"babel-plugin-apply-mdx-type-prop@1.6.12","_nodeVersion":"14.4.0","_npmVersion":"lerna/3.22.1/node@v14.4.0+x64 (darwin)","dist":{"integrity":"sha512-dXfOWP7rUlJy3p5D+LRp35wPdhcYmZKdVJBFgjQUw81BUrGqDhH0oAKbnnYIcDarCdK+qRgmgnOb1nkhDD3zGg==","shasum":"a955c655249143b314e9147c9b974a06af519b4c","tarball":"http://registry-npm.ywwl.com/babel-plugin-apply-mdx-type-prop/download/babel-plugin-apply-mdx-type-prop-1.6.12.tgz","fileCount":4,"unpackedSize":3964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFZ/bCRA9TVsSAnZWagAANFAQAIKm8QqJx1eJ9oJCrAac\ntEBUBEau1FS//csY4DzS1W591fLB9wKWj+7kq4u3AZCPifel8swMpFUxUrtg\n4SE/6IuRNUfiVpaVjL/n2/Oez67wMnZ0YutTFi4sYkIPSzTDXXoUZnc75xCx\nJFMZJ6z1OtWaM/y10BtWAldxX0AYqEGi8vX2ZNVO2QGKwJSh06w2CrV23YEF\n2m9iO2G9y2AS3xu7IEzYKKNXIBTdlpnxiyH225gAgoszc4msgdhIO2Z12+K3\nMUInsXjT2w5aEPCFtduwZYSxp4TV3BWL9rpUmSVKjSWR04krE0Pgz5OSjrDa\nbk9HM7jd2VV00yd9J3wEopSeKvmD+TIzHPx4L3GhcoxCEWYdbfXsdPt/Q5S1\nHPfJfbEwrCgF4+6FpieIG/I0PResuoH0gCS7vl9gwTiesZdDz5VpFx/w65Uo\n4FTdrO/GX8bMjHpcc+G6QwiFMqtWZ+K6mJ1jNBBLXIcqyYmzpk/DcbanUofc\ntO15dvmVi77sKjg9fveM9s+1BXWfWcL85gIWlJt9n7WXDk9+uRdWP6S43HJF\no0SqXgdElWEGjQz/Gqw+i3pXolJvM20Ratp+ZWkoPmkTVROz0P4jEd+UWPJC\ngkJa47D2Nmf6G9XX4dsXeL6Zy4qB5t4iz61NVSCeAsVseA+GaaYnsM40NYLi\nZjx8\r\n=4EkX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFP8XJkQynmaVtwmFVPyuItQ4ujLfPV7E1bSAy1Uk2axAiEAgOrDWDYYEmVYHvoTcCoVYaDzFPxL84VprAL4yAqsaNg="}],"size":1993,"noattachment":false,"key":"/babel-plugin-apply-mdx-type-prop/-/babel-plugin-apply-mdx-type-prop-1.6.12.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.12_1595252699222_0.6417650559131434"},"_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":1595252699317,"_cnpm_publish_time":1595252699317,"dist-tags":{"ci":"1.6.13-ci.1","latest":"2.0.0","next":"2.0.0-next.8"}}