{"_id":"@calebmer/babel-plugin-inferno","_rev":"2-a4c91023c7dc34c455587f0e559867df","name":"@calebmer/babel-plugin-inferno","dist-tags":{"latest":"6.0.1"},"versions":{"6.0.0":{"name":"@calebmer/babel-plugin-inferno","version":"6.0.0","description":"Turn JSX into Inferno virtual DOM","repository":{"type":"git","url":"git+https://github.com/trueadm/babel-plugin-inferno.git"},"license":"MIT","main":"lib/index.js","devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-eslint":"^8.2.2","babel-helper-replace-supers":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-es2015":"^6.24.1","chai":"^4.1.2","eslint":"^4.19.0","istanbul":"^0.4.5","mocha":"^5.0.4"},"scripts":{"coverage":"istanbul cover ./node_modules/.bin/_mocha tests.js","test":"_mocha tests.js","debug":"node --inspect-brk ./node_modules/.bin/_mocha debug tests.js","lint":"eslint lib","lintfix":"eslint lib --fix"},"keywords":["babel-plugin","babel","es2015","es2016","inferno","jsx"],"dependencies":{"@babel/plugin-syntax-jsx":"^7.0.0-beta.44"},"engines":{"node":">=6"},"gitHead":"e8dbc053793d5ec922ceaf53dc8b9e30d9df9738","bugs":{"url":"https://github.com/trueadm/babel-plugin-inferno/issues"},"homepage":"https://github.com/trueadm/babel-plugin-inferno#readme","_id":"@calebmer/babel-plugin-inferno@6.0.0","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"calebmer","email":"calebmeredith8@gmail.com"},"dist":{"integrity":"sha512-7ZhkTVNPhKk3k7H4kEaE1MtYHRg4W259Vy/iO7f+mBmF2GTl6iTiIU93gER0KSDoRCRtGDn9Xe3a9oXs1/02jw==","shasum":"2b54a10cb7629606fdd5583f76a2fed2cca4218b","tarball":"https://registry.npmjs.org/@calebmer/babel-plugin-inferno/-/babel-plugin-inferno-6.0.0.tgz","fileCount":10,"unpackedSize":49763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa28J+CRA9TVsSAnZWagAAeFMP/iOLyaK860jA3Nylpaso\nTP4/iNFZhWgMuTrCIlaqO9c3FR8y6ucaNA9vCMddlJSiiQvTkt/sLxYQZUJV\nVM92J67069G9EyRAxahXWVTcSonqlJjXud7Z5+uCX2Jyz5QDteI1HSwN8rR7\nKNyBEpnvUmE5eoGtwKkgyh6XbS8NL1nI7OQ2RLm34TXPxyeLN+ypb3MYRV/z\nTpBzty6EnufBmCJkkv8nT0svcpZOthh+e5kzlwr+mPt6nA1gN121Sl/u8RU6\n0tTGmr3W6viOmI6svvEgJl4IPD6Yo6Py2jvo78+EfpbGmsA3sw32vjJ4SpxW\nABpqw3m9Yy6969xzH+SdLF8wmNERyZNUqDL7JnOKJsLhki7CC9Zu6COgXsyA\nrLbL0g9Sh7pe/p86cw7hS8cCNYDOraDfVPYoxlp/HRfkaOc6blcgzbBA2pQt\nWhQZb3p7NylcfRXzEO8UNP/Cc8mfOT2eSubktE6sEveNkYJeeFuSpiyQx+EF\nQNJTLXBX9nVHxXEvnKtqkvz6tVbtUHnQFlMx7ZMpFzRA7ODcRAJ/RWFefigp\nva1Hxxt4cleQ2GryyJG6bKI+tdDFaWs+RfODxwkCyIPRGw77KqBD0PvK2I1h\nNVjNMRX4Vyhd1qpkNoifVW04x+c5DOaNpZR44B5WdjAqUUQVWuMwZ1R6YNT9\nOmWk\r\n=WSBS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBtB7FmKkW5vqZ3y6kwr/oXIkDuG5vt8I+V6HLb9iLqmAiEAsajEC32J74HpXapo6sq9L6/hNV8cedX5PPsvR/WFI0Q="}]},"maintainers":[{"name":"calebmer","email":"calebmeredith8@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-inferno_6.0.0_1524351613587_0.030799314457392812"},"_hasShrinkwrap":false},"6.0.1":{"name":"@calebmer/babel-plugin-inferno","version":"6.0.1","description":"Turn JSX into Inferno virtual DOM","repository":{"type":"git","url":"git+https://github.com/trueadm/babel-plugin-inferno.git"},"license":"MIT","main":"lib/index.js","devDependencies":{"babel-cli":"^6.26.0","babel-core":"^6.26.0","babel-eslint":"^8.2.2","babel-helper-replace-supers":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-es2015":"^6.24.1","chai":"^4.1.2","eslint":"^4.19.0","istanbul":"^0.4.5","mocha":"^5.0.4"},"scripts":{"coverage":"istanbul cover ./node_modules/.bin/_mocha tests.js","test":"_mocha tests.js","debug":"node --inspect-brk ./node_modules/.bin/_mocha debug tests.js","lint":"eslint lib","lintfix":"eslint lib --fix"},"keywords":["babel-plugin","babel","es2015","es2016","inferno","jsx"],"dependencies":{"@babel/plugin-syntax-jsx":"^7.0.0-beta.46"},"engines":{"node":">=6"},"gitHead":"4f6eea72c98e5c38a64835db30624b1192d929b4","bugs":{"url":"https://github.com/trueadm/babel-plugin-inferno/issues"},"homepage":"https://github.com/trueadm/babel-plugin-inferno#readme","_id":"@calebmer/babel-plugin-inferno@6.0.1","_npmVersion":"5.3.0","_nodeVersion":"8.5.0","_npmUser":{"name":"calebmer","email":"calebmeredith8@gmail.com"},"dist":{"integrity":"sha512-4Dc0/vwRk2wsJPdmNCiti3GAYJ6PAag/0HyJvJ+xqrn5UQCHLeoKGWT6l5Jl8Dv5a4qD/pnsz2WOkIXLXuWHeg==","shasum":"d983dcab4c4a1665b8cb1577bb97c99bfdf1d61c","tarball":"https://registry.npmjs.org/@calebmer/babel-plugin-inferno/-/babel-plugin-inferno-6.0.1.tgz","fileCount":10,"unpackedSize":49763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa78HNCRA9TVsSAnZWagAAlrEP/1H2EYimMNkNOoTwRkCi\nk87gdXJBwd1T0Y53rDBt2pIsG9PX/LO5oQYoMgjutnFZofYXQ49B7ep9zUEZ\nwbgk9GP8oJvvlne16IiqOzLJH9fVUFpveFUVsScEH5PTDTPa+FDJCeOA4tVs\nli8jgvvpevEmpBgd7nW12Pf65sKbpfCZdj+Ex2E/y/TNy8awDr2H0gxD1UXz\ny1oF8PRpDMhX6yPN1eqN3OZqrGbLKLQyBfPNSaA3VqMxT1Kt7WKDLQviNGSJ\nGyLSNEWjW/k5gxPw990doWI+zavYMnIXHJQ066g64P6ogy8CssXIqQaDnEYX\nUiJ0LDHXf1/dBe+9hJZg2h/Sx0WJf2j2ZUq9gkdy7eIt5jGqrCmOm0aUQg9M\nIR6dLtTu+BqvgzhTU+WBoJWq2Rr82Oe3JNdOSh3Rjjcz1jYlqINXckWvhow7\nXsNDWfOwVqW7hjOrU3jxugQ3WoDcuWBVUvELIK+CgiuHWO/3oWTl0AQuXexL\naLp+dWEFiktZww/m3wBFqUN/Fj62R/VrcGZTWPsdhpJMPkXZq5wvmi2NLxlr\nJDmWo3j35l6y9PpC5BWZcVynTAfQdm8ZlFcUWcr1YC0qQQHYCTFfjqm6X5o1\n7TYSz7X1jz7PUsOJYNloLiofx1W7hngukMOk/xL/fI50Yhd+yajE9HcqSFXe\nTHCV\r\n=FRWv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAQZa4e1OQiICBTdlwrjbvBi4iPVnapzpp4oi3NUAxFlAiBaKbnGMtzBANoqP67zyV3bfvXZw7JElJWADSObiNcOqQ=="}]},"maintainers":[{"name":"calebmer","email":"calebmeredith8@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-inferno_6.0.1_1525662155852_0.3292236189460531"},"_hasShrinkwrap":false}},"time":{"created":"2018-04-21T23:00:13.525Z","6.0.0":"2018-04-21T23:00:13.701Z","modified":"2022-04-04T21:31:56.237Z","6.0.1":"2018-05-07T03:02:36.078Z"},"maintainers":[{"name":"calebmer","email":"calebmeredith8@gmail.com"}],"description":"Turn JSX into Inferno virtual DOM","homepage":"https://github.com/trueadm/babel-plugin-inferno#readme","keywords":["babel-plugin","babel","es2015","es2016","inferno","jsx"],"repository":{"type":"git","url":"git+https://github.com/trueadm/babel-plugin-inferno.git"},"bugs":{"url":"https://github.com/trueadm/babel-plugin-inferno/issues"},"license":"MIT","readme":"<p align=\"center\"><a href=\"https://infernojs.org/\" target=\"_blank\"><img width=\"400\" alt=\"Inferno\" title=\"Inferno\" src=\"https://user-images.githubusercontent.com/2021355/36073166-a47d4a8e-0f34-11e8-959c-860ea836d79d.png\"></p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/babel-plugin-inferno\"><img src=\"https://img.shields.io/npm/dm/babel-plugin-inferno.svg\" alt=\"Downloads\"></a>\n  <a href=\"https://www.npmjs.com/package/babel-plugin-inferno\"><img src=\"https://img.shields.io/npm/v/babel-plugin-inferno.svg\" alt=\"Version\"></a>\n  <a href=\"https://www.npmjs.com/package/babel-plugin-inferno\"><img src=\"https://img.shields.io/npm/l/babel-plugin-inferno.svg\" alt=\"License\"></a>\n</p>\n\n# InfernoJS Babel Plugin\n\n> Plugin for babel 6+ to enable JSX for Inferno\n\nThis plugin transforms JSX code in your projects to [Inferno](https://github.com/trueadm/inferno) compatible virtual DOM.\nIt is recommended to use this plugin for compiling JSX for inferno. It is different to other JSX plugins, because it outputs highly optimized inferno specific `createVNode` calls. This plugin also checks children shape during compilation stage to reduce overhead from runtime application. \n\n## How to install\n\n**Note!** Make sure babel-plugin has same **major** version as the inferno you are using!\n\n```bash\nnpm i --save-dev babel-plugin-inferno\n```\n\n## How to use\n\nAdd the plugin to your `package.json` and update the plugin section in your `.babelrc` file. Or if your Babel settings are located inside the `package.json` - update the plugin section there.\n\nIt's important that you also include the `babel-plugin-syntax-jsx`plugin.\n\nExample on a `.babelrc` file that will work with Inferno:\n\nMake sure inferno plugin is added before babel module transformers\n\n```js\n{   \n    \"presets\": [ \"es2015\" ],\n    \"plugins\": [[\"babel-plugin-inferno\", {\"imports\": true}]]\n}\n```\n\n## Examples    \n\n```js\n\n// Render a simple div\nInferno.render(<div></div>, container);\n\n// Render a div with text\nInferno.render(<div>Hello world</div>, container);\n\n// Render a div with a boolean attribute\nInferno.render(<div autoFocus='true' />, container);\n\n```\n\n## Special flags\n\nThis plugin provides few special compile time flags that can be used to optimize an inferno application.\n\n```js\n// ChildFlags:\n<div $HasVNodeChildren /> - Children is another vNode (Element or Component)\n<div $HasNonKeyedChildren /> - Children is always array without keys\n<div $HasKeyedChildren /> - Children is array of vNodes having unique keys\n<div $ChildFlag={expression} /> - This attribute is used for defining children shpae runtime. See inferno-vnode-flags (ChildFlags) for possibe values\n\n// Functional flags\n<div $ReCreate /> - This flag tells inferno to always remove and add the node. It can be used to replace key={Math.random()}\n```\n\nFlag called `noNormalize` has been removed in v4, and is replaced by `$HasVNodeChildren`\n\n## Options\n\n\nChange in v4:\n\n\n#### Imports (boolean)\nBy default babel-plugin-inferno uses imports. That means you no longer need to import inferno globally.\nJust import the inferno specific code YOUR code uses.\n\nexample:\n```js\nimport {render} from 'inferno'; // Just import what you need, (render in this case)\n\n// The plugin will automatically import, createVNode\nrender(<div>1</div>, document.getElementById('root'));\n```\n\nYou need to have support for ES6 modules for this to work. If you are using legacy build system or outdated version of webpack, you can revert this change by using `imports: false`\n\n```js\n{\n    \"presets\": [ \"es2015\" ],\n    \"plugins\": [[\"inferno\", {\n        \"imports\": false\n    }]]\n}\n```\n\n\n#### Pragma\n\nEach method that is used from inferno can be replaced by custom name.\n\n``` pragma ``` (string) defaults to createVNode.\n\n``` pragmaCreateComponentVNode ``` (string) defaults to createComponentVNode.\n \n``` pragmaNormalizeProps ``` (string) defaults to normalizeProps.\n \n``` pragmaTextVNode ``` (string) defaults to createTextVNode.\n \n\n\n\n\n```js\n{\n    \"presets\": [ \"es2015\" ],\n    \"plugins\": [[\"inferno\", {\n        \"imports\": true,\n        \"pragma\": \"\",\n        \"pragmaCreateComponentVNode\": \"\",\n        \"pragmaNormalizeProps\": \"\",\n        \"pragmaTextVNode\": \"\"\n    }]]\n}\n```\n","readmeFilename":"README.md"}