{"id":17033317,"url":"https://github.com/tomosterlund/generate-vue-component","last_synced_at":"2025-04-12T12:51:34.425Z","repository":{"id":65519522,"uuid":"332235802","full_name":"tomosterlund/generate-vue-component","owner":"tomosterlund","description":"CLI tool for generating Vue-components. Written in Node.","archived":false,"fork":false,"pushed_at":"2021-01-26T22:55:52.000Z","size":38,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T07:36:24.375Z","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":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomosterlund.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-23T14:57:39.000Z","updated_at":"2024-03-01T13:58:47.000Z","dependencies_parsed_at":"2023-01-27T02:10:28.171Z","dependency_job_id":null,"html_url":"https://github.com/tomosterlund/generate-vue-component","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomosterlund%2Fgenerate-vue-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomosterlund%2Fgenerate-vue-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomosterlund%2Fgenerate-vue-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomosterlund%2Fgenerate-vue-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomosterlund","download_url":"https://codeload.github.com/tomosterlund/generate-vue-component/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571398,"owners_count":21126517,"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-14T08:33:53.101Z","updated_at":"2025-04-12T12:51:34.398Z","avatar_url":"https://github.com/tomosterlund.png","language":"JavaScript","funding_links":[],"categories":["Scaffold [🔝](#readme)","Components \u0026 Libraries"],"sub_categories":["Scaffold"],"readme":"# vuejs-generate\nA CLI for generating component- and module templates in Vue.js.\n\n## List of content\n1. [Install](#install)\n2. [Usage](#usage)\n    * [Generating Vue components](#generating-a-vue-compoment)\n    * [Generating a Vuex store](#generating-a-vuex-store)\n    * [Generating Vuex modules](#generating-vuex-modules)\n    * [Generating unit tests](#generating-unit-tests)\n\n## Install\n```\nnpm i -g vuejs-generate\n```\n\n## Usage\nDisplay all commands in terminal with:\n```\n$ vg help\n```\n\n## Generating a Vue compoment\n```\n$ vg component \u003cname\u003e\n```\n\nIf an **./src/components** or **./components** directory exists, the component will be created there.  \nIf not, it will be created in the directory where the command is executed.\n\n#### Component flags\n| Flag name      | Description |\n| ----------- | ----------- |\n| -d   | Adds a data property      |\n| -m   | Adds a methods property       |\n| -x   | Adds an Axios import        |\n| -s   | Sets style-lang attribute to SCSS        |\n| -a   | Adds all of the options above        |\n| -t   | Sets up a unit test for the component, in \\\u003cname\\\u003e.spec.js        |\n\n#### Example\n```\n$ vg component Button -d -m\n```\nGenerates a file called Button.vue which contains a vue component with data- and methods properties.\n\n## Generating a Vuex store\n```\n$ vg store\n```\nIf an **./src/store** or **./store** already exists the vg CLI will prompt you to override this folder. The store is created with a default module, _myModule_. To overwrite this default name, use the -m flag and type in the module name you want:\n\n#### Example\n```\n$ vg store -m SessionModule\nVuex store was created - Don't forget to import it on your Vue instance\nSessionModule was created in Vuex-store\n```\n\n## Generating Vuex modules\n```\n$ vg vuexmod \u003cmodulename\u003e\n```\n\nIf an **./src/store** or **./store** directory exists, the module will be created there.  \nIf not, it will be created in the directory where the command is executed.\n\n#### Example\n```\n$ vg vuexmod SessionModule  \nSessionModule was created in Vuex-store\n```\n\n## Generating unit tests\n```\n$ vg test \u003cname\u003e\n```\nCreates a yourTestName.spec.js file, with some scaffolding for a Vue test utils/jest unit test suite. If a **./tests/unit** or **./tests** folder exist, the test will be created there. Else it will be created in current directory.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomosterlund%2Fgenerate-vue-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomosterlund%2Fgenerate-vue-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomosterlund%2Fgenerate-vue-component/lists"}