{"id":17193695,"url":"https://github.com/andrei-markeev/vue2jsx","last_synced_at":"2025-06-25T10:33:32.417Z","repository":{"id":83676830,"uuid":"139294418","full_name":"andrei-markeev/vue2jsx","owner":"andrei-markeev","description":"Small utility for converting Vue templates to jsx.","archived":false,"fork":false,"pushed_at":"2018-08-19T23:31:56.000Z","size":10,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-15T06:42:19.989Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrei-markeev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-07-01T02:24:42.000Z","updated_at":"2023-10-19T18:36:12.000Z","dependencies_parsed_at":"2023-04-25T21:26:37.778Z","dependency_job_id":null,"html_url":"https://github.com/andrei-markeev/vue2jsx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andrei-markeev/vue2jsx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrei-markeev%2Fvue2jsx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrei-markeev%2Fvue2jsx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrei-markeev%2Fvue2jsx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrei-markeev%2Fvue2jsx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrei-markeev","download_url":"https://codeload.github.com/andrei-markeev/vue2jsx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrei-markeev%2Fvue2jsx/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259802162,"owners_count":22913578,"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-15T01:44:45.403Z","updated_at":"2025-06-14T10:33:19.554Z","avatar_url":"https://github.com/andrei-markeev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue2jsx\n\nConvert Vue html templates to their JSX representation.\n\nUsage:\n\n```\nnpm i -g vue2jsx\nvue2jsx my-component.vue \u003e my-component.tsx\n```\n\n**Note**: some post-processing is usually necessary after the conversion.\n\n## Example\n\nThe following Vue SFC:\n```html\n\u003cscript\u003e\n    export default {\n        data() {\n            return {\n                user: null,\n                users: null\n            }\n        }\n    }\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n    \u003cdiv\u003e\n        \u003ch1 v-if=\"user\"\u003eHello, {{user.name}}!\u003c/h1\u003e\n        \u003cdiv v-else-if=\"users\"\u003e\n            Hello to all of you:\n            \u003cul\u003e\n                \u003cli v-for=\"u in users\" v-bind:key=\"u.id\"\u003eu.name\u003c/li\u003e!\n            \u003c/ul\u003e\n        \u003c/div\u003e\n        \u003ch1 v-else\u003eHello, anonymous!\u003c/h1\u003e\n    \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cstyle\u003e\n    h1 { color: green }\n\u003c/style\u003e\n```\n\nresults in this output:\n\n```jsx\nconst render = function(h) { return (\n    \u003cdiv\u003e\n        { this.user ? \u003ch1\u003eHello, { this.user.name }!\u003c/h1\u003e\n         : this.users ? \u003cdiv\u003e\n            Hello to all of you:\n            \u003cul\u003e\n                { this.users.map(u =\u003e \u003cli key={ u.id }\u003eu.name\u003c/li\u003e) }!\n            \u003c/ul\u003e\n        \u003c/div\u003e\n         : \u003ch1\u003eHello, anonymous!\u003c/h1\u003e }\n    \u003c/div\u003e\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrei-markeev%2Fvue2jsx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrei-markeev%2Fvue2jsx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrei-markeev%2Fvue2jsx/lists"}