File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -61,10 +61,21 @@ async function askProjectType(options: ProjectOptions) {
61
61
? await dialog . ask ( {
62
62
prompt : "cache org" ,
63
63
parse : ( v : string ) : string => v ,
64
- default : NPM . inferOrg ( options . name ) ,
64
+ default : `@ ${ options . org ?? options . name } ` ,
65
65
} )
66
66
: null ;
67
67
68
+ const prefix =
69
+ cache === "npm" && org === `@${ options . name } `
70
+ ? ""
71
+ : cache === "npm"
72
+ ? await dialog . ask ( {
73
+ prompt : "cache prefix" ,
74
+ parse : ( v : string ) : string => v ,
75
+ default : `${ options . name } -` ,
76
+ } )
77
+ : null ;
78
+
68
79
const ci = await dialog . ask ( {
69
80
prompt : "ci provider" ,
70
81
parse : oneOf ( { npm : "github" as const , none : undefined } ) ,
@@ -76,7 +87,7 @@ async function askProjectType(options: ProjectOptions) {
76
87
options . library = {
77
88
lang : Lang . TS ,
78
89
module : ModuleType . ESM ,
79
- cache : cache === "npm" ? new NPM ( options . name , org ! ) : undefined ,
90
+ cache : cache === "npm" ? new NPM ( org ! , prefix ! ) : undefined ,
80
91
ci : ci === "github" ? new GitHub ( ) : undefined ,
81
92
platforms : platforms . length === 1 ? platforms [ 0 ] : platforms ,
82
93
} ;
You can’t perform that action at this time.
0 commit comments