fix(core): accept vue as preset in cnw (#21262)
This commit is contained in:
parent
e2a819ef18
commit
33e13910b1
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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') {
|
||||
|
||||
@ -20,6 +20,7 @@ export enum Preset {
|
||||
Nest = 'nest',
|
||||
Express = 'express',
|
||||
React = 'react',
|
||||
Vue = 'vue',
|
||||
Angular = 'angular',
|
||||
NodeStandalone = 'node-standalone',
|
||||
NodeMonorepo = 'node-monorepo',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user