{"id":13739681,"url":"https://github.com/roman01la/babel-plugin-react-hyperscript","last_synced_at":"2025-04-14T10:50:47.303Z","repository":{"id":74176390,"uuid":"88636757","full_name":"roman01la/babel-plugin-react-hyperscript","owner":"roman01la","description":"HyperScript syntax for React components without runtime overhead","archived":false,"fork":false,"pushed_at":"2017-07-28T04:48:12.000Z","size":21,"stargazers_count":20,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T02:59:28.405Z","etag":null,"topics":["hyperscript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roman01la.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-04-18T14:49:03.000Z","updated_at":"2024-07-16T15:00:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"7976d096-1bf5-4722-9f91-27881c2e7a4e","html_url":"https://github.com/roman01la/babel-plugin-react-hyperscript","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":"0.11111111111111116","last_synced_commit":"1457c3d4f270dac1efa9b10d76d5f4b0b89b9a77"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roman01la%2Fbabel-plugin-react-hyperscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roman01la%2Fbabel-plugin-react-hyperscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roman01la%2Fbabel-plugin-react-hyperscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roman01la%2Fbabel-plugin-react-hyperscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roman01la","download_url":"https://codeload.github.com/roman01la/babel-plugin-react-hyperscript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248868826,"owners_count":21174754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hyperscript"],"created_at":"2024-08-03T04:00:36.520Z","updated_at":"2025-04-14T10:50:47.279Z","avatar_url":"https://github.com/roman01la.png","language":"JavaScript","funding_links":[],"categories":["Plugins"],"sub_categories":["React"],"readme":"# babel-plugin-react-hyperscript\n\n[![npm](https://img.shields.io/npm/v/babel-plugin-react-hyperscript.svg)](https://www.npmjs.com/package/babel-plugin-react-hyperscript)\n\n*HyperScript syntax for React components without runtime overhead.*\n\nCompiles [react-hyperscript](https://github.com/mlmorg/react-hyperscript) into `React.createElement`.\n\n\n## Example\n\n**Input**\n```js\nh('h1#boom.whatever.foo', [\n  h('span'),\n  h(MyComponent, { text: 'Hello!' })\n]);\n```\n\n**Output**\n```js\nReact.createElement('h1', {\n  id: 'boom',\n  className: 'whatever foo'\n},\nReact.createElement('span'),\nReact.createElement(MyComponent, { text: 'Hello!' }));\n```\n\n## Installation\n\n```\nnpm i babel-plugin-react-hyperscript\n```\n\n## Plugin options\n\n**pragma**\n\nBy default calls to `h` will be replaced with `React.createElement`, but you can override this with a custom pragma (including `h` itself when used with [Preact](https://github.com/developit/preact)).\n```js\n{\n  \"plugins\": [\"react-hyperscript\", { \"pragma\": \"yo\" }]\n}\n```\n\n```js\n// Input\nh('h1#boom.whatever.foo', [\n  h('span'),\n  h(MyComponent, { text: 'Hello!' })\n]);\n\n// Output\nyo('h1', {\n  id: 'boom',\n  className: 'whatever foo'\n},\nyo('span'),\nyo(MyComponent, { text: 'Hello!' }));\n```\n\n## Usage\n\n### Via .babelrc (Recommended)\n\n__.babelrc__\n```json\n{\n  \"plugins\": [\"react-hyperscript\"]\n}\n```\n\n### Via CLI\n```\nbabel --plugins react-hyperscript script.js\n```\n\n### Via Node API\n```js\nrequire(\"babel-core\").transform(\"code\", {\n  plugins: [\"react-hyperscript\"]\n});\n```\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froman01la%2Fbabel-plugin-react-hyperscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froman01la%2Fbabel-plugin-react-hyperscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froman01la%2Fbabel-plugin-react-hyperscript/lists"}