File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -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
@@ -200,7 +202,9 @@ export async function create({
200202 } ) ,
201203 ) ;
202204
203- const { targetDir, packageName } = formatProjectName ( projectName ) ;
205+ const formatted = formatProjectName ( projectName ) ;
206+ const { targetDir } = formatted ;
207+ const packageName = argv [ 'package-name' ] || formatted . packageName ;
204208 const distFolder = path . isAbsolute ( targetDir )
205209 ? targetDir
206210 : path . join ( cwd , targetDir ) ;
You can’t perform that action at this time.
0 commit comments