{"id":18781735,"url":"https://github.com/dillonchanis/vue-mason","last_synced_at":"2025-04-13T12:06:40.630Z","repository":{"id":57396426,"uuid":"123517993","full_name":"dillonchanis/vue-mason","owner":"dillonchanis","description":"A command line tool for quickly generating and scaffolding Vue files.","archived":false,"fork":false,"pushed_at":"2018-04-07T02:16:09.000Z","size":113,"stargazers_count":11,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-27T00:03:14.082Z","etag":null,"topics":["cli","javascript","node","scaffold","vue","vue-cli","vue-mason"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dillonchanis.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":"2018-03-02T02:15:09.000Z","updated_at":"2019-10-30T09:03:45.000Z","dependencies_parsed_at":"2022-09-06T02:52:32.351Z","dependency_job_id":null,"html_url":"https://github.com/dillonchanis/vue-mason","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/dillonchanis%2Fvue-mason","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dillonchanis%2Fvue-mason/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dillonchanis%2Fvue-mason/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dillonchanis%2Fvue-mason/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dillonchanis","download_url":"https://codeload.github.com/dillonchanis/vue-mason/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223479566,"owners_count":17151931,"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":["cli","javascript","node","scaffold","vue","vue-cli","vue-mason"],"created_at":"2024-11-07T20:33:18.038Z","updated_at":"2024-11-07T20:33:18.692Z","avatar_url":"https://github.com/dillonchanis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-mason\nA command line tool for quickly generating and scaffolding Vue files.\n\n## Installation\n\n```bash\nnpm install -g vue-mason\n```\n\n## Usage\n\n```bash\nvue-mason --help\n```\n\n### Creating Components\n\nVue Mason currently has support for quickly generating:\n- Basic Single File Vue Components (SFVC)\n- JSX Components\n- Render Function Components\n- Vue Class Components\n\nBy default, Vue Mason will create a Basic SFVC.\n\n```bash\nvue-mason create:component MyComponent\n```\n\nWhere `MyComponent` is the name of the component you want to create.\n\nTo specify a different template type you must pass the `--type` flag followed by the type you want to create.\n\n```bash\nvue-mason create:component MyComponent --type jsx\n```\n\n| Type | Value\n| ---  | ---\n| SFCV | (default)\n| JSX  | jsx\n| Render | render\n| Class | class\n\nGenerating a component this way will look for a `./src/components/` path. If it does not exist it will create one for you to save the file.  However, this may not work for you so you can also pass in the path of where to save the component.\n\n```bash\nvue-mason create:component MyComponent --path /some/path\n```\n\n### Creating Route Files\n\nYou can create route files through Vue Mason as well. Currently, the following template is used to scaffold your routes:\n\n```javascript\nimport {} from ''\n\nexport default [\n  {\n    path: '',\n    name: '',\n    component: ''\n  }\n]\n```\n\nTo create a route:\n\n```bash\nvue-mason create:route /dashboard\n```\n\nYou can specify other options here too like the component to map the route to and the name of the route.\n\n```bash\nvue-mason create:route /dashboard --component DashboardComponent --name dashboard\n```\n\nWe can specify more than one route as well:\n\n```bash\nvue-mason create:route /dashboard /favorites /settings\n```\n\nBy default, Vue Mason will save it to a file called `routes.js`.  You can update this to suit your needs with the `--filename` flag.\n\n```bash\nvue-mason create:route /dashboard --filename dashboardroutes.js\n```\n\nYou can change the default save path, `./src/`, using the `--path` flag.\n\n```bash\nvue-mason create:route /dashboard --path /my/dashboard/stuff\n```\n\n### Creating Vuex Store files\n\nFinally, Vue Mason allows for quickly creating Vuex store related files.\n\nThere are two template types to choose from:\n- Flat (default)\n- Spread\n\nThe `flat` option will create stubs for your initial state, getters, actions and mutations.  The `spread` option will create a separate file initial state, getters, actions, muatations, and mutation types.\n\n```bash\nvue-mason create:store StoreName\nvue-mason create:store StoreName --type spread\n```\n\nWe can also specify if the store module is namespaced or not via the `--namespaced` flag. By default, a store module is not namespaced.\n\n```bash\nvue-mason create:store StoreName --namespaced\n```\n\nAs with the other file creation options we can change the default save path of `./src/`.\n\n```bash\nvue-mason create:store StoreName --path /store/modules/\n```\n\n## Status: Beta\nThe base of the features are there but there are probably some bugs.  We still need testing setup and other ideas ironed out. If you come across a bug please [submit an issue](https://github.com/dillonchanis/vue-mason/issues).  We are accepting PRs!\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdillonchanis%2Fvue-mason","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdillonchanis%2Fvue-mason","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdillonchanis%2Fvue-mason/lists"}