diff --git a/docs/generated/cli/create-nx-workspace.md b/docs/generated/cli/create-nx-workspace.md index a506f37afd824..ac1210df32eaa 100644 --- a/docs/generated/cli/create-nx-workspace.md +++ b/docs/generated/cli/create-nx-workspace.md @@ -139,7 +139,7 @@ Package manager to use Type: `string` -Customizes the initial content of your workspace. Default presets include: ["apps", "empty", "core", "npm", "ts", "web-components", "angular-monorepo", "angular-standalone", "react-monorepo", "react-standalone", "vue-monorepo", "vue-standalone", "nuxt", "nuxt-standalone", "next", "nextjs-standalone", "react-native", "expo", "nest", "express", "react", "angular", "node-standalone", "node-monorepo", "ts-standalone"]. To build your own see https://nx.dev/extending-nx/recipes/create-preset +Customizes the initial content of your workspace. Default presets include: ["apps", "empty", "core", "npm", "ts", "web-components", "angular-monorepo", "angular-standalone", "react-monorepo", "react-standalone", "vue-monorepo", "vue-standalone", "nuxt", "nuxt-standalone", "next", "nextjs-standalone", "react-native", "expo", "nest", "express", "react", "vue", "angular", "node-standalone", "node-monorepo", "ts-standalone"]. To build your own see https://nx.dev/extending-nx/recipes/create-preset ### routing diff --git a/docs/generated/packages/nx/documents/create-nx-workspace.md b/docs/generated/packages/nx/documents/create-nx-workspace.md index a506f37afd824..ac1210df32eaa 100644 --- a/docs/generated/packages/nx/documents/create-nx-workspace.md +++ b/docs/generated/packages/nx/documents/create-nx-workspace.md @@ -139,7 +139,7 @@ Package manager to use Type: `string` -Customizes the initial content of your workspace. Default presets include: ["apps", "empty", "core", "npm", "ts", "web-components", "angular-monorepo", "angular-standalone", "react-monorepo", "react-standalone", "vue-monorepo", "vue-standalone", "nuxt", "nuxt-standalone", "next", "nextjs-standalone", "react-native", "expo", "nest", "express", "react", "angular", "node-standalone", "node-monorepo", "ts-standalone"]. To build your own see https://nx.dev/extending-nx/recipes/create-preset +Customizes the initial content of your workspace. Default presets include: ["apps", "empty", "core", "npm", "ts", "web-components", "angular-monorepo", "angular-standalone", "react-monorepo", "react-standalone", "vue-monorepo", "vue-standalone", "nuxt", "nuxt-standalone", "next", "nextjs-standalone", "react-native", "expo", "nest", "express", "react", "vue", "angular", "node-standalone", "node-monorepo", "ts-standalone"]. To build your own see https://nx.dev/extending-nx/recipes/create-preset ### routing diff --git a/packages/create-nx-workspace/bin/create-nx-workspace.ts b/packages/create-nx-workspace/bin/create-nx-workspace.ts index 976ccdffbca49..92f0dccd7d604 100644 --- a/packages/create-nx-workspace/bin/create-nx-workspace.ts +++ b/packages/create-nx-workspace/bin/create-nx-workspace.ts @@ -381,6 +381,7 @@ async function determineStack( case Preset.NextJs: case Preset.NextJsStandalone: return 'react'; + case Preset.Vue: case Preset.VueStandalone: case Preset.VueMonorepo: case Preset.Nuxt: @@ -638,7 +639,7 @@ async function determineVueOptions( let appName: string; let e2eTestRunner: undefined | 'none' | 'cypress' | 'playwright' = undefined; - if (parsedArgs.preset) { + if (parsedArgs.preset && parsedArgs.preset !== Preset.Vue) { preset = parsedArgs.preset; if (preset === Preset.VueStandalone || preset === Preset.NuxtStandalone) { appName = parsedArgs.appName ?? parsedArgs.name; @@ -646,13 +647,14 @@ async function determineVueOptions( appName = await determineAppName(parsedArgs); } } else { + const framework = await determineVueFramework(parsedArgs); + const workspaceType = await determineStandaloneOrMonorepo(); if (workspaceType === 'standalone') { appName = parsedArgs.appName ?? parsedArgs.name; } else { appName = await determineAppName(parsedArgs); } - const framework = await determineVueFramework(parsedArgs); if (framework === 'nuxt') { if (workspaceType === 'standalone') { diff --git a/packages/create-nx-workspace/src/utils/preset/preset.ts b/packages/create-nx-workspace/src/utils/preset/preset.ts index d9ee05393a120..35e6ba7f1d52f 100644 --- a/packages/create-nx-workspace/src/utils/preset/preset.ts +++ b/packages/create-nx-workspace/src/utils/preset/preset.ts @@ -20,6 +20,7 @@ export enum Preset { Nest = 'nest', Express = 'express', React = 'react', + Vue = 'vue', Angular = 'angular', NodeStandalone = 'node-standalone', NodeMonorepo = 'node-monorepo',