{"name":"babel-plugin-apply-mdx-type-prop","version":"1.5.5","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.0","@mdx-js/util":"^1.5.5"},"gitHead":"7d428e2cee605db8e7642e3af0df91e0d96c3684","_id":"babel-plugin-apply-mdx-type-prop@1.5.5","_nodeVersion":"12.14.1","_npmVersion":"lerna/3.20.2/node@v12.14.1+x64 (darwin)","dist":{"integrity":"sha512-yaklz3xE5vFtZpPpYC9lDbTqlC6hq0CjgheiLw3i40lY8vG0DINh+HJ7rq1Gi1g0q/iihwetJ+YFGpUM4YXAGA==","shasum":"b5f6333b445f1ec189949225f9309d67c24cf167","tarball":"http://registry-npm.ywwl.com/babel-plugin-apply-mdx-type-prop/download/babel-plugin-apply-mdx-type-prop-1.5.5.tgz","fileCount":4,"unpackedSize":3970,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeIMSpCRA9TVsSAnZWagAAEuYP/1JAGXGDNHYtz8z62AD9\nXeLr6RsXBgDBu6sT+D3tpviZjFLHMFHnx7ANa/bCyDIbS9aFz+LcqfiQ8DWQ\nw08zBEyb6aqF+NMVLKpU9NGygzTpJQJChM+MQzgm2EKKkly0fyBUDfPBqEyN\nJs1zeyWmBcynJFNR/oaRcLM7LfLyP6ImPYymudN+cNa2OPI8MSDHvWXeat0i\na/5IwJ39ztXURT2kszfMLCGviSPCIenz0cZyWSsl6QNROQcSctmpYZ/MfipW\nZ+pcN3R2X66TVy6kQQ3yLe/qjEVDMa03jW/Dfpq9Ti/7hzplua3os9CZ1xcL\ngFHjtQCWSBK1v/B+kB3NkHZfr/cgiaYf+XlVbYiGJ8bkp2F19QAVvjJCMGNG\n3k7CBrgfJkWLknPF+1EFM3TE/tiYcdungaIzpWo3oYTZQWxYIkQG8T7GhKyx\nlXPXweaT3rwI3MdMPco21frKhFjYrvLLSDGO7+dDsErsV9Aftaw0tD34aNcD\nhqqsGHecNtTWH6PSpxnZgsAfI2kPF5inlz6mJKg259nWIRjX44by1t6m09il\nBXFIANR/sr4tPmExgjmMDxkIXnofNx6DVxu8xFaM39sd33yRvHxLz5jiU4xr\nOBE2hZYslOIFs/KJA6hx94PTuijpKEyxMJJVAQwy05SjjRGmywqFMgifGfi+\nqotR\r\n=kfEO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCAESss4SWHpsQQOhrYWTnekwZshcowFHmfIiPsV/UfeQIgOa7DrWsPxLtee210ZQmyFfAB6BY+uG+ac3AGGoPzOOU="}],"size":1991,"noattachment":false,"key":"/babel-plugin-apply-mdx-type-prop/-/babel-plugin-apply-mdx-type-prop-1.5.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.5.5_1579205801475_0.46078957191270775"},"_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":1579205801612,"_cnpm_publish_time":1579205801612,"dist-tags":{"ci":"1.6.13-ci.1","latest":"2.0.0","next":"2.0.0-next.8"}}