{"id":21630522,"url":"https://github.com/belsrc/vue-gen","last_synced_at":"2025-07-17T12:32:58.701Z","repository":{"id":37926463,"uuid":"157934819","full_name":"belsrc/vue-gen","owner":"belsrc","description":"Yet another Vue component generator","archived":false,"fork":false,"pushed_at":"2024-09-06T10:21:31.000Z","size":1869,"stargazers_count":0,"open_issues_count":43,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-28T21:34:17.673Z","etag":null,"topics":["component","generator","vue","vue-components","vue-gen","vuejs"],"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/belsrc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-17T00:06:31.000Z","updated_at":"2021-08-13T17:38:39.000Z","dependencies_parsed_at":"2023-02-02T23:16:22.115Z","dependency_job_id":null,"html_url":"https://github.com/belsrc/vue-gen","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belsrc%2Fvue-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belsrc%2Fvue-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belsrc%2Fvue-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belsrc%2Fvue-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/belsrc","download_url":"https://codeload.github.com/belsrc/vue-gen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226260538,"owners_count":17596495,"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":["component","generator","vue","vue-components","vue-gen","vuejs"],"created_at":"2024-11-25T02:11:19.434Z","updated_at":"2024-11-25T02:11:20.091Z","avatar_url":"https://github.com/belsrc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vue Component Generator\n\n[![Build Status](https://github.com/belsrc/vue-gen/workflows/build-check/badge.svg)](https://github.com/belsrc/vue-gen/actions)\n[![Maintainability](https://img.shields.io/codeclimate/maintainability/belsrc/vue-gen.svg?logo=code%20climate\u0026logoWidth=14\u0026style=flat-square)](https://codeclimate.com/github/belsrc/vue-gen/maintainability)\n[![Code Coverage](https://img.shields.io/codeclimate/coverage/belsrc/vue-gen?logo=code%20climate\u0026style=flat-square)](https://codeclimate.com/github/belsrc/vue-gen/test_coverage)\n[![Total alerts](https://img.shields.io/lgtm/alerts/g/belsrc/vue-gen.svg?logo=lgtm\u0026logoWidth=14\u0026style=flat-square)](https://lgtm.com/projects/g/belsrc/vue-gen/alerts/)\n[![Known Vulnerabilities](https://img.shields.io/snyk/vulnerabilities/github/belsrc/vue-gen.svg?logo=snyk\u0026logoWidth=14\u0026style=flat-square)](https://app.snyk.io/org/belsrc/project/0623bc36-ba88-4751-b85c-6f93c28b5f7c)\n[![Last Commit](https://img.shields.io/github/last-commit/belsrc/vue-gen/master.svg?logo=github\u0026logoWidth=14\u0026style=flat-square)](https://github.com/belsrc/vue-gen/commits/master)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/belsrc/vue-gen/pulls)\n\nGenerate new Vue components from the command line.\n\n## Install\n\n```bash\nnpm i -g @belsrc/vue-gen\n```\n\n## Usage\n\n```bash\nvuegen [component name] [destination]\n```\n\nIf destination is omitted, then the current directory is used.\nVue-gen uses [inquirer](https://github.com/SBoudrias/Inquirer.js/) for interactive generation options.\nThe interactive steps can be skipped if the `-q`/`--quiet` flag is passed. This automatically sets file type `jsx`, stand component, no state.\n\n```\nComponent name? # not shown if name given in command\nWhat type of file?\n  * JSX Component\n  * Single File Component\nIs this a functional component? (y/N)\nWhat type of component?\n  * Standard Component\n  * Router Page\nDoes component have state? (y/N)\n```\n\nSelecting `yes` for functional component will cause the last two questions to be skipped, as they no longer apply.\n\n### Generated Files\n\nFile Type: JSX Component\n\n```\n\u003cdestination\u003e\n└── \u003ccomponent name\u003e/\n    ├── index.jsx\n    ├── styles.scss\n    └── \u003ccomponent name\u003e.test.js\n```\n\nFile Type: Single File Component\n\n```\n\u003cdestination\u003e\n└── \u003ccomponent name\u003e/\n    ├── index.vue\n    └── \u003ccomponent name\u003e.test.js\n```\n\nComponent name is kebab cased for folder/file/css class purposes. And Pascal case for the name property in the component.\n\n\"Is this a functional component,\" if yes, will add the appropriate `functional` tag for the file type and remove the blocks that would be referenced via `this`.\n\n`Router Page` adds the `beforeRouteUpdate` guard to the file, along with a `loadPageData` method that is called from `created` and the `beforeRouteUpdate`.\n\n`Does component have state?`, if yes, will add `import { mapState, mapGetters, mapActions } from 'vuex';` along with the corresponding `...mapX({})` calls.\n\n## Contributing\n\nContributions encouraged! Please check out the [contributing guide](CONTRIBUTING.md) for guidelines about how to proceed.\n\nTrying to report an issue? Please use the [issue template](ISSUE_TEMPLATE.md).\n\nEveryone interacting in the Vue Component Generator codebase and issue tracking is expected to follow the [code of conduct](CODE_OF_CONDUCT.md).\n\n## License\n\nVue-gen is licensed under the [MIT license](LICENSE).\n\nCopyright © 2019 Bryan Kizer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelsrc%2Fvue-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbelsrc%2Fvue-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelsrc%2Fvue-gen/lists"}