Skip to content

Commit 85013dd

Browse files
authored
feat: Added Inkline components resolver. (#282)
1 parent 0a8dc2c commit 85013dd

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ Supported Resolvers:
190190
- [Element UI](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/element-ui.ts)
191191
- [Headless UI](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/headless-ui.ts)
192192
- [IDux](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/idux.ts)
193+
- [Inkline](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/inkline.ts)
193194
- [Naive UI](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/naive-ui.ts)
194195
- [Prime Vue](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/prime-vue.ts)
195196
- [Vant](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/vant.ts)

src/core/resolvers/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export * from './element-plus'
33
export * from './element-ui'
44
export * from './headless-ui'
55
export * from './idux'
6+
export * from './inkline'
67
export * from './naive-ui'
78
export * from './prime-vue'
89
export * from './vant'

src/core/resolvers/inkline.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import type { ComponentResolver } from '../../types'
2+
3+
/**
4+
* Resolver for Inkline
5+
*
6+
* @author @alexgrozav
7+
* @link https://github.com/inkline/inkline
8+
*/
9+
export function InklineResolver(): ComponentResolver {
10+
return {
11+
type: 'component',
12+
resolve: (name: string) => {
13+
if (name.match(/^I[A-Z]/)) {
14+
return {
15+
importName: name,
16+
path: '@inkline/inkline',
17+
}
18+
}
19+
},
20+
}
21+
}

0 commit comments

Comments
 (0)