@@ -80,6 +80,7 @@ export type Argv = {
8080 template ?: string ;
8181 override ?: boolean ;
8282 tools ?: string | string [ ] ;
83+ 'package-name' ?: string ;
8384} ;
8485
8586function logHelpMessage ( name : string , templates : string [ ] ) {
@@ -93,6 +94,7 @@ function logHelpMessage(name: string, templates: string[]) {
9394 -t, --template specify the template to use
9495 --tools select additional tools (biome, eslint, prettier)
9596 --override override files in target directory
97+ --package-name specify the package name
9698
9799 Templates:
98100
@@ -108,6 +110,10 @@ async function getTools({ tools, dir, template }: Argv) {
108110 if ( dir && template ) {
109111 return [ ] ;
110112 }
113+ // skip tools selection when tools is empty string
114+ if ( tools === '' ) {
115+ return [ ] ;
116+ }
111117
112118 return checkCancel < string [ ] > (
113119 await multiselect ( {
@@ -198,7 +204,9 @@ export async function create({
198204 } ) ,
199205 ) ;
200206
201- const { targetDir, packageName } = formatProjectName ( projectName ) ;
207+ const formatted = formatProjectName ( projectName ) ;
208+ const { targetDir } = formatted ;
209+ const packageName = argv [ 'package-name' ] || formatted . packageName ;
202210 const distFolder = path . isAbsolute ( targetDir )
203211 ? targetDir
204212 : path . join ( cwd , targetDir ) ;
0 commit comments