{"_id":"@mapbox/babel-plugin-transform-md-react","_rev":"239-1f883239ec2b8c7ec10dda769bfbf41f","name":"@mapbox/babel-plugin-transform-md-react","description":"Transform Markdown interpolated with JS expressions and JSX elements at compile time","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@mapbox/babel-plugin-transform-md-react","version":"0.1.0","description":"Transform Markdown interpolated with JS expressions and JSX elements at compile time","main":"index.js","scripts":{"precommit":"lint-staged","lint":"eslint *.js test lib","format":"prettier --single-quote --write '{,lib/,test/}*.js'","test-jest":"jest","pretest":"npm run lint","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/mapbox/babel-plugin-transform-md-react.git"},"keywords":["babel","babel-plugin","markdown","react","jsx","transform"],"author":{"name":"Mapbox"},"license":"MIT","bugs":{"url":"https://github.com/mapbox/babel-plugin-transform-md-react/issues"},"homepage":"https://github.com/mapbox/babel-plugin-transform-md-react#readme","dependencies":{"@mapbox/md-react-transformer":"^0.3.0","babylon":"^6.17.4"},"devDependencies":{"babel-preset-es2015":"^6.24.1","eslint":"^4.0.0","eslint-plugin-node":"^5.0.0","husky":"^0.13.4","jest":"^20.0.4","lint-staged":"^4.0.0","prettier":"^1.4.4"},"lint-staged":{"{,lib/,test/}*.js":["prettier --single-quote --write","git add"]},"jest":{"coverageReporters":["json","lcov","text","html"],"resetMocks":true},"engines":{"node":">=4"},"gitHead":"8cc7ec9653b5ad2088eaba7b84193f39c68f101a","_id":"@mapbox/babel-plugin-transform-md-react@0.1.0","_shasum":"c1e75f09efe16b4f52f1b17f64e9108beba3c849","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.0","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"c1e75f09efe16b4f52f1b17f64e9108beba3c849","tarball":"https://registry.npmjs.org/@mapbox/babel-plugin-transform-md-react/-/babel-plugin-transform-md-react-0.1.0.tgz","integrity":"sha512-HRm4pdLg9V/VCIDhlxY2zoOI5JN0sscQwWzYpbMtkHytlJ45m4SlWuvKxPiKO7YVbpJuWizY/3XoxpP6sRiolA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwmgjBD4xQu9U18hhThNTJTxQzPY2zw3EMet0rZVP+kgIgb+SkROFTscRPsghDyNUlI2zIabz99F7DgX/aBaKSu6c="}]},"maintainers":[{"name":"davidtheclark","email":"david.dave.clark@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-transform-md-react-0.1.0.tgz_1498002442815_0.19810088025406003"},"deprecated":"Renamed to @mapbox/babel-plugin-transform-jsxtreme-markdown","directories":{}}},"readme":"# babel-plugin-transform-md-react\n\n[![Build Status](https://travis-ci.org/mapbox/babel-plugin-transform-md-react.svg?branch=master)](https://travis-ci.org/mapbox/babel-plugin-transform-md-react)\n\n🚧 🚧 **EXPERIMENTAL! WORK IN PROGRESS!** 🚧 🚧\n\nTransform Markdown interpolated with JS expressions and JSX elements into pure JSX, at compile time.\n\nUses [md-react-transformer](https://github.com/mapbox/md-react-transformer) to compile the interpolated Markdown.\n\n## Usage\n\nTransforms a special [tagged template literal] (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Tagged_template_literals).\n\n`require` or `import` 'babel-plugin-transform-md-react/md', or whatever you've specified as `packageName` in your Babel options.\nThen use that value as a template literal tag, marking the template literals you'd like to be compiled at run time.\n\n```jsx\n// Input\nconst md = require('babel-plugin-transform-md-react/md');\nconst foo = md`\n  # Title\n  This is **bold.**\n  Here is a [link](/some/url).\n`;\n\n// Output\n'use strict';\n\nvar foo = <div>\n  <h1>Title</h1>\n  <p>This is <strong>bold.</strong>\n    Here is a <a href=\"/some/url\">link</a>.</p>\n</div>;\n```\n\nBecause this plugin uses [md-react-transformer](https://github.com/mapbox/md-react-transformer), you can also interpolate JS expressions and JSX elements within special delimiters. Read more about this in the md-react-transformer docs.\n\n```jsx\n// Input\nconst md = require('babel-plugin-transform-md-react/md');\nconst text = md`\n  This is a paragraph {# <span className=\"foo\"> #} with a **markdown** span inside {# </span> #}\n  {# <div style={{ margin: 70 }}> #}\n    And here is a *paragraph* inside a div.\n    [Link](/some/url)\n  {# </div> #}\n`;\n\n// Output\n'use strict';\n\nvar text = <div>\n  <p>This is a paragraph <span className=\"foo\"> with a <strong>markdown</strong> span inside </span></p>\n  <div style={{ margin: 70 }}>\n    And here is a <em>paragraph</em> inside a div.\n    <a href=\"/some/url\">Link</a>\n  </div>\n</div>;\n```\n\n## Options\n\nYou can pass any of [the options available to `mdReactTransformer.mdToJsx`](https://github.com/mapbox/md-react-transformer#mdtojsx).\n\nAdditional options:\n- **packageName** `?string` - Default: `'babel-plugin-transform-md-react/md'`.\n  The name of the package that you will `require` or `import` to use this thing.\n","maintainers":[{"email":"yannick.meeus+npm+production+ci@mapbox.com","name":"mbx-npm-ci-production"},{"email":"yannick.meeus+npm+staging+ci@mapbox.com","name":"mbx-npm-ci-staging"},{"email":"yannick.meeus+npm+prod+advanced+actions@mapbox.com","name":"mbx-npm-advanced-actions-production"},{"email":"yannick.meeus+npm+staging+advanced+actions@mapbox.com","name":"mbx-npm-advanced-actions-staging"},{"email":"yannick.meeus+npm+prod+09@mapbox.com","name":"mbx-npm-09-production"},{"email":"yannick.meeus+npm+prod+08@mapbox.com","name":"mbx-npm-08-production"},{"email":"yannick.meeus+npm+prod+07@mapbox.com","name":"mbx-npm-07-production"},{"email":"yannick.meeus+npm+prod+06@mapbox.com","name":"mbx-npm-06-production"},{"email":"yannick.meeus+npm+prod+05@mapbox.com","name":"mbx-npm-05-production"},{"email":"yannick.meeus+npm+prod+04@mapbox.com","name":"mbx-npm-04-production"},{"email":"yannick.meeus+npm+prod+03@mapbox.com","name":"mbx-npm-03-production"},{"email":"yannick.meeus+npm+prod+02@mapbox.com","name":"mbx-npm-02-production"},{"email":"yannick.meeus+npm+prod+01@mapbox.com","name":"mbx-npm-01-production"},{"email":"yannick.meeus@mapbox.com","name":"mbx-npm-02-staging"},{"email":"accounts+npmjs-01@mapbox.com","name":"mapbox-npm-01"},{"email":"accounts+npmjs-02@mapbox.com","name":"mapbox-npm-02"},{"email":"accounts+npmjs-07@mapbox.com","name":"mapbox-npm-07"},{"email":"accounts+npmjs-03@mapbox.com","name":"mapbox-npm-03"},{"email":"accounts+npmjs-04@mapbox.com","name":"mapbox-npm-04"},{"email":"accounts+npmjs-09@mapbox.com","name":"mapbox-npm-09"},{"email":"accounts+npmjs-05@mapbox.com","name":"mapbox-npm-05"},{"email":"accounts+npmjs-06@mapbox.com","name":"mapbox-npm-06"},{"email":"accounts+npmjs-08@mapbox.com","name":"mapbox-npm-08"},{"email":"accounts+npmjs-advanced-actions@mapbox.com","name":"mapbox-npm-advanced-actions"},{"email":"accounts+npmjs-npm-ci@mapbox.com","name":"mapbox-npm-ci"},{"email":"accounts+npmjs@mapbox.com","name":"mapbox-npm"},{"email":"accounts@mapbox.com","name":"mapbox-admin"},{"email":"accounts+npm-mapbox-machine-user@mapbox.com","name":"mapbox-machine-user"}],"time":{"modified":"2023-01-12T12:41:22.841Z","created":"2017-06-20T23:47:22.922Z","0.1.0":"2017-06-20T23:47:22.922Z"},"homepage":"https://github.com/mapbox/babel-plugin-transform-md-react#readme","keywords":["babel","babel-plugin","markdown","react","jsx","transform"],"repository":{"type":"git","url":"git+https://github.com/mapbox/babel-plugin-transform-md-react.git"},"author":{"name":"Mapbox"},"bugs":{"url":"https://github.com/mapbox/babel-plugin-transform-md-react/issues"},"license":"MIT","readmeFilename":"README.md"}