{"name":"babel-plugin-apply-mdx-type-prop","version":"1.6.0","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.6.0"},"gitHead":"addb28a01cb234de29d353b6b782a15614e325d7","_id":"babel-plugin-apply-mdx-type-prop@1.6.0","_nodeVersion":"12.10.0","_npmVersion":"lerna/3.20.2/node@v12.10.0+x64 (darwin)","dist":{"integrity":"sha512-wtYaotCmckVs9yiVnubiwE5XjmKOd/cFXLpQJoPzE768HPyrv9FVCauSidjxbrJvZv6wLS+yrfOpZdzGAeI8XA==","shasum":"81955e1d6594dde24f36ef57905d149c33543a7e","tarball":"http://registry-npm.ywwl.com/babel-plugin-apply-mdx-type-prop/download/babel-plugin-apply-mdx-type-prop-1.6.0.tgz","fileCount":4,"unpackedSize":3960,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJepzphCRA9TVsSAnZWagAA09AP/RuVyeGNQy7mUsoYHfNT\nWdv2H/Ik/XkVm1jDpwJTXCKRoAcQkUoVCC+h2IRcRNIwP58xdcogzbf2KeS3\nTGnCmYztX2QjYR7Ab0lSio8eoeRl5xn6SyEPLojMzMqGXkodml6B5PZku741\nwqyNVIteTmMyemb7i5i3bndpYTk8bdrIWK3iPzbGE5QwMiW1j8s8PegBwcuT\nbOF5CUHNg/1wonx+U6LK3vjsYeBh4mT6DPmLlguGh8bxOSjMusTUOgFoDwV7\nqHmWq0u78IFZRfA6Scp+GzydSvy/npeT9GW0jLHQw9jPvmVgk25qDeErlBFK\n5B2IQa0yRKAkz5x8yYLhzz0D8hiA/fRZvRINMMSkCry92oZk769BQK4hJXWX\nH3XN9rhzL4tcAmWe56NvhODUpxCeyywXSfDo3h2b/zBf68IEhBB5Xp5UUxvO\n5GzLgEM4Itm688UNCzlMu0XTybY8lW4k3shfnGq1CwiATN1GqcNd3fTFT1hu\nZPO8Z8RbRexZKP+Xll4QVjRe5j4OCZMb6iKgVC0BsA/f6EZu6Hc07hZ4lN4X\nOhVmgwe0/+6SOCB/pDRZQvTEKNV8prjP+eu0bKdTd08TEGusjI0zKsQVOPO6\nRAQpfbt6NPHDcT/czJa5FIU/Px7hkeFzFRDo0qB1YO7W/ymZHttt9q7SnWnS\ngZQL\r\n=x1QT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6PiLyqpQnCExGcoZj/pMHzzDYQR5j/jzDrbk2QJgEHwIgUy19deDpKnAT+THkfFwCa3CDkqeE5k56fKLHj6vh/1Q="}],"size":1989,"noattachment":false,"key":"/babel-plugin-apply-mdx-type-prop/-/babel-plugin-apply-mdx-type-prop-1.6.0.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.0_1588017760893_0.7221173715864155"},"_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":1588017761046,"_cnpm_publish_time":1588017761046,"dist-tags":{"ci":"1.6.13-ci.1","latest":"2.0.0","next":"2.0.0-next.8"}}