vue3-cxmt-toolkit
v1.4.0
Published
tmp
Downloads
23
Maintainers
Readme
Vue Typescript Toolkit
从构建到开发,帮助开发者快速使用 Typescript 开发 Vue 项目,提升项目构建与开发能力,基于 Ant Design。
Provides built-in TypeScript tooling support,The Vue Typescript command line interface (CLI) is your go-to tool for developing vue3-typescript apps.
vct create - Create vue project template with typescript
vct generate - Create Pages, Components,Services,Modals & vue Features
Automatically create framework features with vct Generate. This command uses the commander CLI to generate features such as pages, components, directives, services, modals and more.
You can specify a path to nest your feature within any number of subdirectories. For example, specify a name of "pages/New Page" to generate page files at src/app/pages/new-page/.
Installation
npm install -g vue3-cxmt-toolkit
Usage:
$ vct create <project-name>
$ vct generate <type> <name>
Inputs:
type ................. The type of feature (e.g. page, component, directive, service)
name ................. The name/path of the feature being generated
Examples:
$ vct -h
$ vct g -h
$ vct create myApp
$ vct create myApp sidemenu|tabs|mix
$ vct generate page about
$ vct generate page contact --router=root|layout
$ vct generate page pages/home/home-a --router=layout
$ vct generate component contact/form
$ vct generate directive ripple --export
$ vct generate directive ripple -e
$ vct generate service user
$ vct generate modal user
$ vct generate store user
$ vct generate/g interface user
$ vct generate/g class user
template type
sidemenu
tabs
mixins
Module Structure
├── class # class files
│ │── classa.ts # class a with typescript
│ └── classb.ts # class b with typescript
│
├── pages # pages
│ ├── page1 # page1
│ └── page2 # page2
│ │── page2.page.html # page2 tempate
│ │── page2.page.ts # page2 logic code
│ │── page2.page.scss # page2 style
│ │── page2.page.vue # page2 vue file for module declare
│ └── page2.routing.ts # page2 routing file for export
│
│
├── components # global components
│ ├── component1 # page1
│ └── component2 # page2
│ │ │── component2.component.html # component2.componentate
│ │ │── component2.component.ts # component2.componentc code
│ │ │── component2.component.scss # component2.componente
│ │ └── component2.component.vue # component2.componentfile for module declare
│ │
│ └── index.ts # module export whit components
│
│
├── modals # global overlay modals
│ ├── modal # modal controller
│ └── modal2 # page2
│ │ │── modal2.modal.html # modal2
│ │ │── modal2.modal.ts # modal2 logic code
│ │ │── modal2.modal.scss # modal2 style
│ │ └── modal2.modal.vue # modal2 file for module declare
│ │
│ └── index.ts # module export whit modals
│
│
├── directives # global directives
│ ├── directive1.ts # directive1
│ ├── directive2.ts # directive2
│ └── index.ts # module export whit directives
│
│── http # http request axios
│ ├── http.ts # axios
│ └── index.ts # request as get,post,download,put,delete
│
│
│── services # api
│
│── layout # global layout
│
│── store # store
│
│── router # router
│
│── icons # router