File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed
Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -80,8 +80,16 @@ export const nextPlugin = createPlugin({
8080 "--no-src-dir" ,
8181 "--import-alias=@/*" ,
8282 ]
83- if ( flags [ "package-manager" ] === "npm" ) {
84- createNextAppArgs . push ( "--use-npm" )
83+ switch ( flags [ "package-manager" ] ) {
84+ case "pnpm" :
85+ createNextAppArgs . push ( "--use-pnpm" )
86+ break
87+ case "yarn" :
88+ // default is yarn. And there's no flag for it.
89+ break
90+ case "npm" :
91+ createNextAppArgs . push ( "--use-npm" )
92+ break
8593 }
8694
8795 await runCommand ( "npx" , [
Original file line number Diff line number Diff line change @@ -61,17 +61,17 @@ export const performSetupSteps = async (
6161 inputs : ValidCNSInputs
6262) : Promise < void > => {
6363 const steps = [
64- // Create Next App
65- nextPlugin . steps . createNextApp ,
66-
67- // Package management
64+ // Update package manager
6865 pnpmPlugin . steps . updatePnpm ,
6966 yarnPlugin . steps . updateYarn ,
70- createNextStackPlugin . steps . installDependencies ,
7167
72- // Remove official CNA content
68+ // Create Next App
69+ nextPlugin . steps . createNextApp ,
7370 nextPlugin . steps . removeOfficialCNAContent ,
7471
72+ // Install dependencies
73+ createNextStackPlugin . steps . installDependencies ,
74+
7575 // Configuration
7676 createNextStackPlugin . steps . addScripts ,
7777 createNextStackPlugin . steps . addGitAttributes ,
You can’t perform that action at this time.
0 commit comments