{"name":"babel-plugin-apply-mdx-type-prop","version":"1.5.8","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.0.0"},"dependencies":{"@babel/helper-plugin-utils":"7.8.3","@mdx-js/util":"^1.5.8"},"gitHead":"e030ddc98360a8a3e19a3140d936d94cf1911bf9","_id":"babel-plugin-apply-mdx-type-prop@1.5.8","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.20.2/node@v12.14.1+x64 (darwin)","dist":{"integrity":"sha512-xYp5F9mAnZdDRFSd1vF3XQ0GQUbIulCpnuht2jCmK30GAHL8szVL7TgzwhEGamQ6yJmP/gEyYNM9OR5D2n26eA==","shasum":"f5ff6d9d7a7fcde0e5f5bd02d3d3cd10e5cca5bf","tarball":"http://registry-npm.ywwl.com/babel-plugin-apply-mdx-type-prop/download/babel-plugin-apply-mdx-type-prop-1.5.8.tgz","fileCount":4,"unpackedSize":3958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefQClCRA9TVsSAnZWagAAFpIQAI7WTKMsn439pSJq7Iip\nT9hqRoYqrJ1lig6psVhK4tTGuDYJSIt+wvvDH2YHJ++WSZUXZUBfrNryERIz\nmeHzlYBWLqndD1+BsaKMpNwPwbFlINuk4bpx2X43o33QT8hir4rdTCd3EkbP\nrISuGbZiH0Q9ysfomI/ovcX2AAh8zd8fXimwj1TpYhn0qdCyLFjer+0MhEul\nRSnKdtJnhdaT0G8mW0sxA0qlECz9Po79GlFBUehhaDtILf472SG+W8200quc\nBXuVJkaey4oW7+rkQ3udq7Kl+YJK48zm8k/qPMVqEsK3VtGudZ3IXCfsv90y\nX6mwQo53J7u7Buh/4Pg/pwo/1IBbZ0A9lavY/Hl/IeUgHEP77HZGPq+IoqOD\nR/yKy/JPNhqtswp/HLEjpyNWBmQDoEtaCZuLyZLbWHjHCWpwun9eud9tMNMS\nUamWUhjZQTynQbvXv84OsiuYcDAtaZvvfEvhPNjjFBJVn8qTz3ps+5cfW47I\nWzPhb37PFZG2cLuWoFqLiDQEV+0DgRisQkXXcw9S1hUEh/QXeDLs/vEV7kFy\n2Qrdbir/ut1bDmC2lyKSvM/OwOWqun2zISlINGgTAlkA857tsIhpzb7quxRy\n7LoKJZ5kzqDp6ald1XdOQu5ZPsWJSbYYMQMtOfJuhE65WEXTTQ5RgJu4BbDJ\nYx1h\r\n=TLlS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7G2MLmK92Qed0ETDQ+314AuKGg0EQYveL8PPp4BqEPwIgffIsZ34hMVCSEkGYBtYl0BNm7r6hJ8o95Rggpe5GObw="}],"size":1992,"noattachment":false,"key":"/babel-plugin-apply-mdx-type-prop/-/babel-plugin-apply-mdx-type-prop-1.5.8.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.5.8_1585250468870_0.0794907655426711"},"_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":1585250468998,"_cnpm_publish_time":1585250468998,"dist-tags":{"ci":"1.6.13-ci.1","latest":"2.0.0","next":"2.0.0-next.8"}}