1.1.0 • Published 1 year ago

vue-global-type-gen v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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

optiondefaultdescription
--config, -cvue-gt.ymlyour 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
1.1.0

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago