vue-global-type-gen

generate global vue components types.
727
Install
npm install vue-global-type-gen
Latest Version:1.1.0
License:MIT
Last Updated:Nov 12, 2022
Links: npm
Maintainer: ubugeeei

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
nuxt-healthz

Nuxt module - quick add healthcheck path: /healthcheck to Nuxt App project

2,536 1
vue-tradingchart

Vue trading view charts

1,494 0
@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