vue-global-type-gen
Vue Global Type Generator
generate global vue components types.
ex.)
declare module '@vue/runtime-core' {
export interface GlobalComponents {
TextBtn: typeof import('example/components/TextBtn.vue').default
LazyTextBtn: typeof import('example/components/TextBtn.vue').default
}
}
Usage
installation
$ npm install -D vue-global-type-gen
# or
$ yarn add -D vue-global-type-gen
# or
$ pnpm install -D vue-global-type-gen
configure your npm scripts
{
"scripts": {
"vue-global-type-gen": "vue-global-type-gen"
}
}
CLI Options
| option | default | description |
|---|---|---|
| --config, -c | vue-gt.yml | your config yml path |
| --version, -v | - | print version |
Configuration
setting vue-gt.yml
# vue-gt.yml
# default
config:
out: auto-import.d.ts
includes: [components/**/*.vue, pages/**/*.vue]
excludes: [node_modules]
stdout: false # when true, print type definition to std out
lazyComponents: true # when true, generate prefix 'Lazy' component
Related Packages
nuxt-openapi-docs-module
A module for Nuxt.js to generate pages from OpenAPI specifications
14,276
37
@chativa/vue2
Chativa Vue 2 — Vue 2.7 / Nuxt 2 wrapper components (ChatIva, ChatBotButton, Gen...
514
3
vue-zo
A Vuejs/Nuxt plugin that allows you to use roles and permissions in your compone...
11,891
12
Version History
| Version | Released | License |
|---|---|---|
| 1.1.0 | MIT | |
| 1.0.6 | MIT | |
| 1.0.5 | MIT | |
| 1.0.4 | MIT | |
| 1.0.3 | MIT | |
| 1.0.2 | MIT | |
| 1.0.1 | MIT | |
| 0.1.1 | ISC | |
| 0.1.0 | ISC | |
| 0.0.6 | ISC | |
| 0.0.5 | ISC | |
| 0.0.4 | ISC | |
| 0.0.3 | ISC | |
| 0.0.2 | ISC |