File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { prompt } from 'enquirer' ;
2
- import { capitalize } from '@tool-pack/basic' ;
2
+ import { pascalCase } from '@tool-pack/basic' ;
3
3
import * as Path from 'path' ;
4
4
import Fse from 'fs-extra' ;
5
5
import chalk from 'chalk' ;
@@ -46,7 +46,7 @@ async function getConfig() {
46
46
} ,
47
47
} ) ) ;
48
48
49
- config . componentName = capitalize ( config . name ) ;
49
+ config . componentName = pascalCase ( config . name ) ;
50
50
51
51
const { confirm } = await prompt < { confirm : boolean } > ( {
52
52
type : 'confirm' ,
@@ -187,7 +187,7 @@ function getFilename(
187
187
{
188
188
doc : 'index.zh-CN.md' ,
189
189
scss : 'index.scss' ,
190
- component : `${ capitalize ( name ) } .tsx` ,
190
+ component : `${ config . componentName } .tsx` ,
191
191
index : 'index.ts' ,
192
192
types : `${ name } .types.ts` ,
193
193
demo : 'demo/basic.tsx' ,
You can’t perform that action at this time.
0 commit comments