{"name":"reactify","version":"0.10.0","description":"browserify v2 plugin for react from Facebook to support jsx","main":"index.js","dependencies":{"jstransform":"^3.0.0","through":"~2.3.4","react-tools":">= 0.9.0"},"devDependencies":{"coffeeify":"~0.x.x","mocha":"~1.9.0","semver":"~1.1.4","browserify":"3.x.x","jshint":"^2.4.4"},"repository":{"type":"git","url":"git://github.com/andreypopp/reactify.git"},"homepage":"https://github.com/andreypopp/reactify","keywords":["react","browserify","browserify-transform","v2","jsx","js","plugin","transform"],"author":{"name":"Andrey Popp","email":"8mayday@gmail.com","url":"http://andreypopp.com"},"license":"MIT","bugs":{"url":"https://github.com/andreypopp/reactify/issues"},"_id":"reactify@0.10.0","dist":{"shasum":"0fa2612faf101e761adb5a287c64f5a08e07983a","tarball":"http://registry-npm.ywwl.com/reactify/download/reactify-0.10.0.tgz","integrity":"sha512-7He/E0ildoF+igu609xB7cIMtEXnqq+xTDESuA26U1km8p0pH9o/xiBeQg953/mn9Zv3G+lrVbkrz/hdlz48sg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC5cjUI+cbP7u6iJHrFd9kRh2FtKoprnRtAgdxQxV9sdQIhAIiwkT10R+oAfRmov6iFPLh8N97OW03zTavzFQHLIOKM"}],"size":4694,"noattachment":false,"key":"/reactify/-/reactify-0.10.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"andreypopp","email":"8mayday@gmail.com"},"maintainers":[{"name":"andreypopp","email":"8mayday@gmail.com"},{"name":"petehunt","email":"floydophone@gmail.com"}],"directories":{},"readme":"# reactify\n\n[Browserify][] transform for JSX (superset of JavaScript used in [React][]\nlibrary):\n\n    var React = require('react')\n\n    class Hello extends React.Component {\n\n      render() {\n        return <div>Hello, {this.props.name}!</div>\n      }\n    }\n\nSave the snippet above as `main.js` and then produce a bundle with the following\ncommand:\n\n    % browserify -t reactify main.js\n\n`reactify` transform activates for files with either `.js` or `.jsx` extensions.\n\nIf you want to reactify modules with other extensions, pass an `-x /\n--extension` option:\n\n    % browserify -t coffeeify -t [ reactify --extension coffee ] main.coffee\n\nIf you don't want to specify extension, just pass `--everything` option:\n\n    % browserify -t coffeeify -t [ reactify --everything ] main.coffee\n\n## ES6 transformation\n\n`reactify` transform also can compile a limited set of es6 syntax constructs\ninto es5. Supported features are arrow functions, rest params, templates, object\nshort notation and classes. You can activate this via `--es6` or `--harmony`\nboolean option:\n\n    % browserify -t [ reactify --es6 ] main.js\n\nes6 class getter and setter methods can be activated via `--target es5` option:\n\n    % browserify -t [ reactify --es6 --target es5 ] main.js\n\nYou can also configure it in package.json\n\n```json\n{\n    \"name\": \"my-package\",\n    \"browserify\": {\n        \"transform\": [\n            [\"reactify\", {\"es6\": true}]\n        ]\n    }\n}\n```\n\n## Troubleshooting\n\n### Code in 3rd-party packages isn't being transformed by reactify\n\nBy default Browserify applies transforms only for modules in the current package. That means that if there are modules with JSX in packages in `node_modules/` directory then browserify will throw SyntaxError left and right even if you are using reactify.\n\nThe best way to fix that is ask package author to publish to npm with code compiled down to plain ES5 which is runnable in browsers and Node.js as-is.\n\nAnother approach is to ask to add\n```\n\"browserify\": {\n  \"transform\": [\"reactify\"]\n}\n```\nto the package's `package.json`. That will make Browserify apply reactify transform for that package too.\n\nAnother way is to activate reactify with `-g` option which will instruct Browserify to apply reactify to every module it encounters:\n```\n% browserify -g reactify main.js\n```\nNote that this will lead to slower builds as every module will be parsed and transformed by reactify even if it doesn't have JSX code in it. \n\n\n[Browserify]: http://browserify.org\n[React]: http://facebook.github.io/react/\n","publish_time":1394565585390,"_cnpm_publish_time":1394565585390,"dist-tags":{"latest":"1.1.1"}}