Skip to content

Commit f33ec82

Browse files
committed
chore: format
1 parent ddb7b69 commit f33ec82

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

src/resolvers/varlet-ui.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ import { ComponentResolver } from '../types'
22
import { kebabCase } from '../utils'
33

44
export interface VarletUIResolverOptions {
5-
/**
6-
* import css along with components
7-
*
8-
* @default true
9-
*/
10-
importCss?: boolean
11-
/**
12-
* import less along with components
13-
*
14-
* @default false
15-
*/
16-
importLess?: boolean
5+
/**
6+
* import css along with components
7+
*
8+
* @default true
9+
*/
10+
importCss?: boolean
11+
/**
12+
* import less along with components
13+
*
14+
* @default false
15+
*/
16+
importLess?: boolean
1717
}
1818

1919
/**
@@ -22,20 +22,20 @@ export interface VarletUIResolverOptions {
2222
* @link https://github.com/haoziqaq/varlet
2323
*/
2424
export const VarletUIResolver = (options: VarletUIResolverOptions = {}): ComponentResolver => (name: string) => {
25-
const {
26-
importCss = true,
27-
importLess
28-
} = options
29-
if (name.startsWith('Var')) {
30-
const partialName = name.slice(3)
31-
return {
32-
importName: partialName,
33-
path: '@varlet/ui/es',
34-
sideEffects: importLess
35-
? `@varlet/ui/es/${kebabCase(partialName)}/style/less.js`
36-
: importCss
37-
? `@varlet/ui/es/${kebabCase(partialName)}/style`
38-
: undefined
39-
}
25+
const {
26+
importCss = true,
27+
importLess,
28+
} = options
29+
if (name.startsWith('Var')) {
30+
const partialName = name.slice(3)
31+
return {
32+
importName: partialName,
33+
path: '@varlet/ui/es',
34+
sideEffects: importLess
35+
? `@varlet/ui/es/${kebabCase(partialName)}/style/less.js`
36+
: importCss
37+
? `@varlet/ui/es/${kebabCase(partialName)}/style`
38+
: undefined,
4039
}
40+
}
4141
}

0 commit comments

Comments
 (0)