105 lines
4.9 KiB
JSON
105 lines
4.9 KiB
JSON
{
|
|
"_args": [
|
|
[
|
|
{
|
|
"raw": "babel-plugin-transform-react-jsx@^6.5.0",
|
|
"scope": null,
|
|
"escapedName": "babel-plugin-transform-react-jsx",
|
|
"name": "babel-plugin-transform-react-jsx",
|
|
"rawSpec": "^6.5.0",
|
|
"spec": ">=6.5.0 <7.0.0",
|
|
"type": "range"
|
|
},
|
|
"/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/babel-preset-react-native"
|
|
]
|
|
],
|
|
"_from": "babel-plugin-transform-react-jsx@>=6.5.0 <7.0.0",
|
|
"_id": "babel-plugin-transform-react-jsx@6.24.1",
|
|
"_inCache": true,
|
|
"_location": "/babel-plugin-transform-react-jsx",
|
|
"_nodeVersion": "6.9.0",
|
|
"_npmOperationalInternal": {
|
|
"host": "packages-12-west.internal.npmjs.com",
|
|
"tmp": "tmp/babel-plugin-transform-react-jsx-6.24.1.tgz_1491578353896_0.45240585040301085"
|
|
},
|
|
"_npmUser": {
|
|
"name": "hzoo",
|
|
"email": "hi@henryzoo.com"
|
|
},
|
|
"_npmVersion": "3.10.10",
|
|
"_phantomChildren": {},
|
|
"_requested": {
|
|
"raw": "babel-plugin-transform-react-jsx@^6.5.0",
|
|
"scope": null,
|
|
"escapedName": "babel-plugin-transform-react-jsx",
|
|
"name": "babel-plugin-transform-react-jsx",
|
|
"rawSpec": "^6.5.0",
|
|
"spec": ">=6.5.0 <7.0.0",
|
|
"type": "range"
|
|
},
|
|
"_requiredBy": [
|
|
"/babel-preset-fbjs",
|
|
"/babel-preset-react-native"
|
|
],
|
|
"_resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz",
|
|
"_shasum": "840a028e7df460dfc3a2d29f0c0d91f6376e66a3",
|
|
"_shrinkwrap": null,
|
|
"_spec": "babel-plugin-transform-react-jsx@^6.5.0",
|
|
"_where": "/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/babel-preset-react-native",
|
|
"dependencies": {
|
|
"babel-helper-builder-react-jsx": "^6.24.1",
|
|
"babel-plugin-syntax-jsx": "^6.8.0",
|
|
"babel-runtime": "^6.22.0"
|
|
},
|
|
"description": "Turn JSX into React function calls",
|
|
"devDependencies": {
|
|
"babel-helper-plugin-test-runner": "^6.24.1"
|
|
},
|
|
"directories": {},
|
|
"dist": {
|
|
"shasum": "840a028e7df460dfc3a2d29f0c0d91f6376e66a3",
|
|
"tarball": "https://registry.npmjs.org/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz"
|
|
},
|
|
"keywords": [
|
|
"babel-plugin"
|
|
],
|
|
"license": "MIT",
|
|
"main": "lib/index.js",
|
|
"maintainers": [
|
|
{
|
|
"name": "amasad",
|
|
"email": "amjad.masad@gmail.com"
|
|
},
|
|
{
|
|
"name": "hzoo",
|
|
"email": "hi@henryzoo.com"
|
|
},
|
|
{
|
|
"name": "jmm",
|
|
"email": "npm-public@jessemccarthy.net"
|
|
},
|
|
{
|
|
"name": "loganfsmyth",
|
|
"email": "loganfsmyth@gmail.com"
|
|
},
|
|
{
|
|
"name": "sebmck",
|
|
"email": "sebmck@gmail.com"
|
|
},
|
|
{
|
|
"name": "thejameskyle",
|
|
"email": "me@thejameskyle.com"
|
|
}
|
|
],
|
|
"name": "babel-plugin-transform-react-jsx",
|
|
"optionalDependencies": {},
|
|
"readme": "# babel-plugin-transform-react-jsx\n\n> Turn JSX into React function calls\n\n## Example\n\n### React\n\n**In**\n\n```javascript\nvar profile = <div>\n <img src=\"avatar.png\" className=\"profile\" />\n <h3>{[user.firstName, user.lastName].join(' ')}</h3>\n</div>;\n```\n\n**Out**\n\n```javascript\nvar profile = React.createElement(\"div\", null,\n React.createElement(\"img\", { src: \"avatar.png\", className: \"profile\" }),\n React.createElement(\"h3\", null, [user.firstName, user.lastName].join(\" \"))\n);\n```\n\n### Custom\n\n**In**\n\n```javascript\n/** @jsx dom */\n\nvar { dom } = require(\"deku\");\n\nvar profile = <div>\n <img src=\"avatar.png\" className=\"profile\" />\n <h3>{[user.firstName, user.lastName].join(' ')}</h3>\n</div>;\n```\n\n**Out**\n\n```javascript\n/** @jsx dom */\n\nvar dom = require(\"deku\").dom;\n\nvar profile = dom( \"div\", null,\n dom(\"img\", { src: \"avatar.png\", className: \"profile\" }),\n dom(\"h3\", null, [user.firstName, user.lastName].join(\" \"))\n);\n```\n\n## Installation\n\n```sh\nnpm install --save-dev babel-plugin-transform-react-jsx\n```\n\n## Usage\n\n### Via `.babelrc` (Recommended)\n\n**.babelrc**\n\nWithout options:\n\n```json\n{\n \"plugins\": [\"transform-react-jsx\"]\n}\n```\n\nWith options:\n\n```json\n{\n \"plugins\": [\n [\"transform-react-jsx\", {\n \"pragma\": \"dom\" // default pragma is React.createElement\n }]\n ]\n}\n```\n\n### Via CLI\n\n```sh\nbabel --plugins transform-react-jsx script.js\n```\n\n### Via Node API\n\n```javascript\nrequire(\"babel-core\").transform(\"code\", {\n plugins: [\"transform-react-jsx\"]\n});\n```\n\n## Options\n\n### `pragma`\n\n`string`, defaults to `React.createElement`.\n\nReplace the function used when compiling JSX expressions.\n\nNote that the `@jsx React.DOM` pragma has been deprecated as of React v0.12\n\n### `useBuiltIns`\n\n`boolean`, defaults to `false`.\n\nWhen spreading props, use `Object.assign` directly instead of Babel's extend helper.\n",
|
|
"readmeFilename": "README.md",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-react-jsx"
|
|
},
|
|
"scripts": {},
|
|
"version": "6.24.1"
|
|
}
|