{"id":15314647,"url":"https://github.com/unframework/html2hyperscript","last_synced_at":"2025-10-09T00:32:26.311Z","repository":{"id":26203354,"uuid":"29649567","full_name":"unframework/html2hyperscript","owner":"unframework","description":"Convert legacy HTML to Hyperscript (https://github.com/dominictarr/hyperscript and https://github.com/Matt-Esch/virtual-dom/blob/master/virtual-hyperscript)","archived":true,"fork":false,"pushed_at":"2020-01-02T17:49:46.000Z","size":9,"stargazers_count":45,"open_issues_count":4,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-31T16:48:22.027Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unframework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-22T03:19:53.000Z","updated_at":"2024-03-17T02:43:10.000Z","dependencies_parsed_at":"2022-07-25T00:32:13.737Z","dependency_job_id":null,"html_url":"https://github.com/unframework/html2hyperscript","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unframework%2Fhtml2hyperscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unframework%2Fhtml2hyperscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unframework%2Fhtml2hyperscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unframework%2Fhtml2hyperscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unframework","download_url":"https://codeload.github.com/unframework/html2hyperscript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219877249,"owners_count":16554912,"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":[],"created_at":"2024-10-01T08:46:30.898Z","updated_at":"2025-10-09T00:32:21.047Z","avatar_url":"https://github.com/unframework.png","language":"JavaScript","readme":"[![Build Status](https://travis-ci.org/unframework/html2hyperscript.svg?branch=master)](https://travis-ci.org/unframework/html2hyperscript)\n\n# Convert Legacy HTML to Hyperscript\n\nAutomatically translate old HTML markup into the new Hyperscript markup embeddable directly inside your component Javascript code.\n\nUse this for hand-converting legacy project source code (e.g. AngularJS templates): care is taken to preserve original whitespace and even comments. For dynamic serving and CI builds check out https://github.com/alexmingoia/jsx-transform instead.\n\n```\nnpm install -g html2hyperscript\nhtml2hyperscript legacy_markup_file.html \u003e shiny_new_syntax.js\n```\n\nSee Hyperscript library: https://github.com/dominictarr/hyperscript\n\nAlso useful for virtual DOM Hyperscript-like syntax: https://github.com/Matt-Esch/virtual-dom\n\nHTML goes in:\n\n```html\n\u003ctable class=\"sample-html\"\u003e\n  \u003ctr\u003e\n    \u003cth\u003ePandas\u003c/th\u003e\n    \u003cth\u003eKittens\u003c/th\u003e\n    \u003cth\u003eHedgehogs\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003efoo\u003c/td\u003e\n    \u003ctd\u003ebar\u003c/td\u003e\n    \u003ctd\u003ebaz\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e32\u003c/td\u003e\n    \u003ctd\u003e45\u003c/td\u003e\n    \u003ctd\u003e83\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eonomatopoeia\u003c/td\u003e\n    \u003ctd\u003eschadenfreude\u003c/td\u003e\n    \u003ctd\u003eantidisestablishmentarianism\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n```\n\nHyperscript-like JS syntax comes out:\n\n```js\nh(\"table.sample-html\", [\n  h(\"tr\", [\n    h(\"th\", [ \"Pandas\" ]),\n    h(\"th\", [ \"Kittens\" ]),\n    h(\"th\", [ \"Hedgehogs\" ])\n  ]),\n  h(\"tr\", [\n    h(\"td\", [ \"foo\" ]),\n    h(\"td\", [ \"bar\" ]),\n    h(\"td\", [ \"baz\" ])\n  ]),\n  h(\"tr\", [\n    h(\"td\", [ \"32\" ]),\n    h(\"td\", [ \"45\" ]),\n    h(\"td\", [ \"83\" ])\n  ]),\n  h(\"tr\", [\n    h(\"td\", [ \"onomatopoeia\" ]),\n    h(\"td\", [ \"schadenfreude\" ]),\n    h(\"td\", [ \"antidisestablishmentarianism\" ])\n  ])\n])\n```\n\n## TODO\n\n- some tests\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funframework%2Fhtml2hyperscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funframework%2Fhtml2hyperscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funframework%2Fhtml2hyperscript/lists"}