{"_id":"@danielberndt/htmltojsx","_rev":"321775","name":"@danielberndt/htmltojsx","description":"Converts HTML to JSX for use with React","dist-tags":{"latest":"0.3.4"},"maintainers":[{"name":"danielberndt","email":"daniel.berndt@gmail.com"}],"time":{"modified":"2021-06-04T01:27:26.000Z","created":"2018-10-10T15:31:08.614Z","0.3.4":"2018-10-15T00:20:54.234Z","0.3.3":"2018-10-14T23:53:35.322Z","0.3.2":"2018-10-10T15:31:08.614Z"},"users":{},"author":{"name":"Daniel Lo Nigro","email":"daniel@dan.cx","url":"http://dan.cx/"},"repository":{"type":"git","url":"git://github.com/reactjs/react-magic.git"},"versions":{"0.3.4":{"name":"@danielberndt/htmltojsx","version":"0.3.4","description":"Converts HTML to JSX for use with React","main":"src/htmltojsx.js","bin":{"htmltojsx":"src/cli.js"},"dependencies":{"css-to-object":"^1.1.0","jsdom-no-contextify":"~3.1.0","react":"~15.4.1","react-dom":"~15.4.1","yargs":"~4.6.0"},"devDependencies":{"babel-preset-es2015":"^6.24.1","babel-preset-react":"^6.5.0","del":"~2.2.0","gulp":"~3.9.0","gulp-babel":"^6.1.3","gulp-gh-pages":"~0.5.4","gulp-livereload":"~3.8.1","gulp-rename":"~1.2.0","gulp-uglify":"~1.5.1","gulp-webpack":"~1.5.0","merge-stream":"~1.0.0","webpack":"~1.13.0"},"repository":{"type":"git","url":"git://github.com/reactjs/react-magic.git"},"keywords":["react","jsx","htmltojsx","html","react-component"],"author":{"name":"Daniel Lo Nigro","email":"daniel@dan.cx","url":"http://dan.cx/"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/reactjs/react-magic/issues"},"homepage":"https://github.com/reactjs/react-magic","gitHead":"305d4046222d2703c575b3d91bd10f87b0cd9b37","_id":"@danielberndt/htmltojsx@0.3.4","_npmVersion":"5.6.0","_nodeVersion":"9.11.2","_npmUser":{"name":"danielberndt","email":"daniel.berndt@gmail.com"},"dist":{"shasum":"98bd9d3c30dbd719fd1d5fab6043a233c3b707ab","size":25286,"noattachment":false,"key":"/@danielberndt/htmltojsx/-/@danielberndt/htmltojsx-0.3.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/@danielberndt/htmltojsx/download/@danielberndt/htmltojsx-0.3.4.tgz"},"maintainers":[{"name":"danielberndt","email":"daniel.berndt@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/htmltojsx_0.3.4_1539562854054_0.9873149415205849"},"_hasShrinkwrap":false,"publish_time":1539562854234,"_cnpm_publish_time":1539562854234},"0.3.3":{"name":"@danielberndt/htmltojsx","version":"0.3.3","description":"Converts HTML to JSX for use with React","main":"src/htmltojsx.js","bin":{"htmltojsx":"src/cli.js"},"dependencies":{"jsdom-no-contextify":"~3.1.0","react":"~15.4.1","react-dom":"~15.4.1","to-style":"^1.3.3","yargs":"~4.6.0"},"devDependencies":{"babel-preset-es2015":"^6.24.1","babel-preset-react":"^6.5.0","del":"~2.2.0","gulp":"~3.9.0","gulp-babel":"^6.1.3","gulp-gh-pages":"~0.5.4","gulp-livereload":"~3.8.1","gulp-rename":"~1.2.0","gulp-uglify":"~1.5.1","gulp-webpack":"~1.5.0","merge-stream":"~1.0.0","webpack":"~1.13.0"},"repository":{"type":"git","url":"git://github.com/reactjs/react-magic.git"},"keywords":["react","jsx","htmltojsx","html","react-component"],"author":{"name":"Daniel Lo Nigro","email":"daniel@dan.cx","url":"http://dan.cx/"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/reactjs/react-magic/issues"},"homepage":"https://github.com/reactjs/react-magic","gitHead":"685112330695c120d86baab07459a5630e153801","_id":"@danielberndt/htmltojsx@0.3.3","_npmVersion":"5.6.0","_nodeVersion":"9.11.2","_npmUser":{"name":"danielberndt","email":"daniel.berndt@gmail.com"},"dist":{"shasum":"7d7dd8d1c29750985142f3ae95032e3bd8b90c66","size":25291,"noattachment":false,"key":"/@danielberndt/htmltojsx/-/@danielberndt/htmltojsx-0.3.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/@danielberndt/htmltojsx/download/@danielberndt/htmltojsx-0.3.3.tgz"},"maintainers":[{"name":"danielberndt","email":"daniel.berndt@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/htmltojsx_0.3.3_1539561215162_0.07820833649925674"},"_hasShrinkwrap":false,"publish_time":1539561215322,"_cnpm_publish_time":1539561215322},"0.3.2":{"name":"@danielberndt/htmltojsx","version":"0.3.2","description":"Converts HTML to JSX for use with React","main":"src/htmltojsx.js","bin":{"htmltojsx":"src/cli.js"},"dependencies":{"css-to-object":"^1.1.0","jsdom-no-contextify":"~3.1.0","react":"~15.4.1","react-dom":"~15.4.1","yargs":"~4.6.0"},"devDependencies":{"babel-preset-es2015":"^6.6.0","babel-preset-react":"^6.5.0","del":"~2.2.0","gulp":"~3.9.0","gulp-babel":"^6.1.2","gulp-gh-pages":"~0.5.4","gulp-livereload":"~3.8.1","gulp-rename":"~1.2.0","gulp-uglify":"~1.5.1","gulp-webpack":"~1.5.0","merge-stream":"~1.0.0","webpack":"~1.13.0"},"repository":{"type":"git","url":"git://github.com/reactjs/react-magic.git"},"keywords":["react","jsx","htmltojsx","html","react-component"],"author":{"name":"Daniel Lo Nigro","email":"daniel@dan.cx","url":"http://dan.cx/"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/reactjs/react-magic/issues"},"homepage":"https://github.com/reactjs/react-magic","gitHead":"b21cf35926320ac7e111eebbac75ad7019c5b2b4","_id":"@danielberndt/htmltojsx@0.3.2","_npmVersion":"5.6.0","_nodeVersion":"9.11.2","_npmUser":{"name":"danielberndt","email":"daniel.berndt@gmail.com"},"dist":{"shasum":"81905aea82cfc6f0a69e14e0272c28c70c7a4c0c","size":25229,"noattachment":false,"key":"/@danielberndt/htmltojsx/-/@danielberndt/htmltojsx-0.3.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@danielberndt/htmltojsx/download/@danielberndt/htmltojsx-0.3.2.tgz"},"maintainers":[{"name":"danielberndt","email":"daniel.berndt@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/htmltojsx_0.3.2_1539185468418_0.1098990537683584"},"_hasShrinkwrap":false,"publish_time":1539185468614,"_cnpm_publish_time":1539185468614}},"readme":"React-Magic and HTMLtoJSX\n=========================\n\nReact-Magic is an experimental library that uses the power of Facebook's\n[React](http://facebook.github.io/react/) library to inject AJAX-loading\ngoodness into plain old HTML webpages, without having to write any custom\nJavaScript. You can even use CSS transitions between the pages. Simply add a\nsingle script tag (or click a bookmarklet) and \"it just works\".\n\n[HTMLtoJSX](README-htmltojsx.md) is a component of React-Magic that converts\nHTML to JSX. It can be used standalone, either on the web or via Node.js.\n\nUnder the covers\n================\n\nReact-Magic intercepts all navigation (link clicks and form posts) and loads\nthe requested page via an AJAX request. React is then used to \"diff\" the old\nHTML with the new HTML, and only update the parts of the DOM that have been\nchanged.\n\nDemos\n=====\n\n* [Page transitions](http://stuff.dan.cx/facebook/react-hacks/magic/red.php)\n* [Form submission](http://stuff.dan.cx/facebook/react-hacks/magic/feedback1.htm)\n\nUsage\n=====\n\nTo use React-Magic, add a `<script>` tag to the bottom of your page, right above\nthe `</body>`:\n\n```html\n<script src=\"http://magic.reactjs.net/magic-loader.js\"></script>\n```\n\nThis handles loading all the required scripts. Alternatively, you can put all\nthe required scripts instead:\n\n```html\n<script src=\"http://fb.me/react-0.13.3.min.js\"></script>\n<script src=\"http://fb.me/JSXTransformer-0.13.3.js\"></script>\n<script src=\"http://magic.reactjs.net/magic.min.js\"></script>\n```\n\nThe end result is the same.\n\nA fun party trick is adding a bookmarklet to your browser which can be used to\nReactify *any* plain HTML site. Click it and mystify your friends:\n\n```javascript\njavascript:(function(b){function c(){if(0!==d.length){var e=d.shift(),a=b.createElement(\"script\");a.src=e;a.onload=c;b.body.appendChild(a)}}var d=[\"http://fb.me/react-0.13.3.min.js\",\"http://fb.me/JSXTransformer-0.13.3.js\",\"http://magic.reactjs.net/magic.min.js\"];c();return!1})(document);\n```\n\nThis just loads the same scripts as referenced above.\n\nCaveat Emptor\n=============\nEven magic comes with its limitations. Since this project is experimental, it may not\nwork properly in all browsers. If you're looking for something that works in\nIE6, you've come to the wrong place.\n\nDevelopment\n===========\nRun `gulp watch` from the root to automatically rebuild the compiled JavaScript\nfiles as you edit them. To run the unit tests, point a web server to \n`build/site` then navigate to `test.htm`. If you use the LiveReload browser \nextension, the tests will automatically reload and rerun when you modify any of \nthe JavaScript.\n\nSimilar Projects\n================\nThis project has been inspired by the\n[Ajaxify](https://github.com/browserstate/ajaxify) project, which achieves a\nsimilar outcome but using jQuery. What makes React-Magic different is that it\nonly updates the DOM nodes that have changed, whereas Ajaxify and similar\nsolutions just blow away the whole document.body on every page load.\n","_attachments":{},"homepage":"https://github.com/reactjs/react-magic","bugs":{"url":"https://github.com/reactjs/react-magic/issues"},"license":"BSD-3-Clause"}