Create Modular TS files for vue-cli@3.0
vue add modular-ts
it will create script in your package.json
npm run g
or without script
vue invoke vue-cli-plugin-modular-ts
You will be prompted what you want module to generate
- Store
- Component
- View
- You can create Store with separete files or in one file
- Components can be scoped
- Views too, also when generating view files you can generate route for that view
| moduleScoped
|
| --- Store
| |
| | - Module Name (input)
| |
| | - Separate files for store (confirm, default 'No')
|
| --- Component
| |
| | --- Module scope (input) (if you leave this blank, it will create component not scoped to anything)
| |
| | --- Module Name (input)
|
| --- View
| |
| | --- Module scope (input) (if you leave this blank, it will create component not scoped to anything)
| |
| | --- Module Name (input)
| |
| | --- Create Router (confirm, default 'Yes') (if view is scoped, router file will be created with name of scoped module, or add route inside already existing scoped router)