{"id":15184939,"url":"https://github.com/turdwaster/vue-unclassify","last_synced_at":"2026-02-17T20:32:12.058Z","repository":{"id":238437546,"uuid":"796574082","full_name":"turdwaster/vue-unclassify","owner":"turdwaster","description":"Create Vue 3 script setup single file components from Vue2/3 class based SFCs","archived":false,"fork":false,"pushed_at":"2024-12-18T09:49:37.000Z","size":394,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-24T06:24:54.711Z","etag":null,"topics":["class-based-components","vue","vue-decorators","vue-facing-decorator","vue2","vue3-composition-api","vue3-typescript","vuejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/turdwaster.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}},"created_at":"2024-05-06T08:03:22.000Z","updated_at":"2025-03-19T18:18:51.000Z","dependencies_parsed_at":"2024-05-14T07:46:55.060Z","dependency_job_id":"2fdca1a6-1d7d-47cd-adae-8407031b09cd","html_url":"https://github.com/turdwaster/vue-unclassify","commit_stats":{"total_commits":68,"total_committers":2,"mean_commits":34.0,"dds":0.08823529411764708,"last_synced_commit":"c09f5304cede94cfc9afb5116e21cbb0cd1e3e26"},"previous_names":["turdwaster/vue-unclassify"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/turdwaster/vue-unclassify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turdwaster%2Fvue-unclassify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turdwaster%2Fvue-unclassify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turdwaster%2Fvue-unclassify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turdwaster%2Fvue-unclassify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/turdwaster","download_url":"https://codeload.github.com/turdwaster/vue-unclassify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turdwaster%2Fvue-unclassify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29557247,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T20:14:27.083Z","status":"ssl_error","status_checked_at":"2026-02-17T20:14:26.018Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["class-based-components","vue","vue-decorators","vue-facing-decorator","vue2","vue3-composition-api","vue3-typescript","vuejs"],"created_at":"2024-09-27T17:42:53.052Z","updated_at":"2026-02-17T20:32:07.047Z","avatar_url":"https://github.com/turdwaster.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-unclassify\n\nGenerate Vue3 TypeScript `\u003cscript setup\u003e` SFCs directly from Vue2/3 class-based single file TypeScript components. Can also be used to convert `vue-facing-decorator` classes to `\u003cscript setup\u003e`.\n\nThis is very much an opinionated **alpha** version that only attempts to transform the `\u003cscript\u003e` element of an SFC. There are surely heaps of bugs.\n\nThe resulting script is always reordered as\n```html\n\u003ctemplate\u003e\n    ... (minor replacements only as of now)\n\u003c/template\u003e\n\u003cscript setup\u003e\n  // Static/non-class/non reactive code\n  // Props\n  // Emits\n  // State (ref:s)\n  // Computeds\n  // Watches\n  // Initialization (onMounted et al)\n  // Functions (former member methods)\n  // Exports (other than default Vue class)\n\u003c/script\u003e\n\u003cstyle\u003e\n   ... (as-is)\n\u003c/style\u003e\n```\n\n## Usage\n`vue-unclassify [-r/--replace] [file patterns...]`\n...or run front end with interactive transpilation (WIP)\n\n## Features\n* AST-based transpilation (90%) using `acorn` - a lot less fragile than existing RegEx tools\n* Direct conversion to `\u003cscript setup\u003e`\n* Attempts to attach comments to original code\n\n## Useful links\n[Interactive online version](https://turdwaster.github.io/linden_dev/)\n[AST explorer, many languages etc](https://astexplorer.net/)\n\n## TODOs\n[ ] Bug: Don't generate invalid uninitialized consts from static members; do `static` -\u003e `let`, `static readonly` -\u003e `const`\n\n[ ] Propagate errors to stdout instead of dumping them in the script tag\n\n[ ] Transpile `$router`\n\n[ ] Improve method body extraction for created() (.substring hack)\n\n### Lower priority TODOs\n[ ] `this.$refs.xyz.focus` -\u003e `const xyz = ref(); ... xyz.value.focus();`\n\n[ ] For readonly members (`public readonly CUT: LengthType = 'Custom';`) -\u003e skip the `ref()`\n\n[ ] Handle multiple script/style sections (passthrough)\n\n[ ] Refactor to allow custom section ordering/templates instead of hardcoded tag/script order\n\n[ ] Resolve import name clashes (rename all locals if an imported name matched)\n```\n    import gridMapperService from \"@/services/gridMapperService\";\n    const gridMapperService = computed((): any =\u003e gridMapperService);\n```\n\n## Project setup\n```\npnpm install\n```\n\n### Run frontend for development\n```\npnpm run build-web\npnpm run dev\n```\n\n### Compile and minify CLI\n```\npnpm run build\n```\n\n### Run unit tests\n```\npnpm run test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturdwaster%2Fvue-unclassify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fturdwaster%2Fvue-unclassify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturdwaster%2Fvue-unclassify/lists"}