WIP: initial setup with vite and vitepress, example with button
This commit is contained in:
13
src/index.ts
13
src/index.ts
@@ -1,12 +1 @@
|
||||
import type { App } from 'vue'
|
||||
import * as components from './components'
|
||||
|
||||
export type ObjectKey = keyof typeof components;
|
||||
|
||||
export default {
|
||||
install(app: App, options: any) {
|
||||
Object.keys(components).forEach(component => {
|
||||
app.component(component, components[component as ObjectKey])
|
||||
})
|
||||
}
|
||||
}
|
||||
export { default as Button } from './components/Button/Button.vue'
|
||||
|
||||
Reference in New Issue
Block a user