@@ -26,14 +26,15 @@ function generateDescription({
26
26
fs . writeFileSync ( file , description ) ;
27
27
const componentName = pascalCase (
28
28
`${ path
29
+ . posix
29
30
. relative ( basePath , filePath )
30
31
. split ( "/" )
31
32
. map ( ( part ) => part . charAt ( 0 ) . toUpperCase ( ) + part . slice ( 1 ) )
32
33
. join ( "" ) } Description`,
33
34
) ;
34
35
35
36
imports . add (
36
- `import ${ componentName } from "./${ path . relative ( basePath , file ) } ";` ,
37
+ `import ${ componentName } from "./${ path . posix . relative ( basePath , file ) } ";` ,
37
38
) ;
38
39
return { componentName } ;
39
40
}
@@ -74,7 +75,7 @@ function generateTypeDef({
74
75
const description = generateDescription ( {
75
76
imports,
76
77
basePath,
77
- filePath : path . join ( parameterPath , "Leading" ) ,
78
+ filePath : path . posix . join ( parameterPath , "Leading" ) ,
78
79
description : leadingDescription ,
79
80
} ) ;
80
81
writer . writeLine ( `leadingDescription={<${ description . componentName } />}` ) ;
@@ -182,7 +183,7 @@ function generateTypeDetails({
182
183
generateTypeDetails ( {
183
184
imports,
184
185
basePath,
185
- parameterPath : path . join ( parameterPath , "items" ) ,
186
+ parameterPath : path . posix . join ( parameterPath , "items" ) ,
186
187
parameter : parameter . items ,
187
188
} ) ,
188
189
) ;
@@ -199,7 +200,7 @@ function generateTypeDetails({
199
200
basePath,
200
201
imports,
201
202
parameter : propValue ,
202
- parameterPath : path . join ( parameterPath , propName ) ,
203
+ parameterPath : path . posix . join ( parameterPath , propName ) ,
203
204
} ) ,
204
205
) ;
205
206
}
@@ -220,7 +221,7 @@ function generateTypeDetails({
220
221
imports,
221
222
parameter : propValue ,
222
223
leadingDescription : `\`${ parameter . discriminator } \`가 \`${ discriminateValue } \`인 경우에만 허용됩니다.\n\n` ,
223
- parameterPath : path . join ( parameterPath , ident ) ,
224
+ parameterPath : path . posix . join ( parameterPath , ident ) ,
224
225
defaultExpanded : false ,
225
226
} ) ,
226
227
) ;
@@ -243,7 +244,7 @@ function generateTypeDetails({
243
244
const description = generateDescription ( {
244
245
imports,
245
246
basePath,
246
- filePath : path . join ( parameterPath , `Variant${ variantValue } ` ) ,
247
+ filePath : path . posix . join ( parameterPath , `Variant${ variantValue } ` ) ,
247
248
description : variant . description ,
248
249
} ) ;
249
250
writer . writeLine ( `<${ description . componentName } />` ) ;
@@ -267,7 +268,7 @@ function generateTypeDetails({
267
268
basePath,
268
269
imports,
269
270
parameter : type ,
270
- parameterPath : path . join (
271
+ parameterPath : path . posix . join (
271
272
parameterPath ,
272
273
`${ parameter . type } ${ index } ` ,
273
274
) ,
@@ -284,7 +285,7 @@ function generateTypeDetails({
284
285
basePath,
285
286
imports,
286
287
parameter : type ,
287
- parameterPath : path . join (
288
+ parameterPath : path . posix . join (
288
289
parameterPath ,
289
290
`${ parameter . type } ${ index } ` ,
290
291
) ,
@@ -557,7 +558,7 @@ export function generateParameter({
557
558
const description = generateDescription ( {
558
559
imports,
559
560
basePath : parameterPath ,
560
- filePath : path . join ( parameterPath , parameterName ) ,
561
+ filePath : path . posix . join ( parameterPath , parameterName ) ,
561
562
description : parameter . description ,
562
563
} ) ;
563
564
writer . writeLine ( `return <${ description . componentName } />;` ) ;
0 commit comments