feat(node): add Node standlone prompt using CNW (#14439)
This commit is contained in:
parent
07f07374fd
commit
da4959a324
@ -335,6 +335,8 @@ async function getConfiguration(
|
|||||||
preset = Preset.ReactStandalone;
|
preset = Preset.ReactStandalone;
|
||||||
} else if (monorepoStyle === 'angular') {
|
} else if (monorepoStyle === 'angular') {
|
||||||
preset = Preset.AngularStandalone;
|
preset = Preset.AngularStandalone;
|
||||||
|
} else if (monorepoStyle === 'node-server') {
|
||||||
|
preset = Preset.NodeServer;
|
||||||
} else {
|
} else {
|
||||||
preset = await determinePreset(argv);
|
preset = await determinePreset(argv);
|
||||||
}
|
}
|
||||||
@ -348,17 +350,19 @@ async function getConfiguration(
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
preset === Preset.ReactStandalone ||
|
preset === Preset.ReactStandalone ||
|
||||||
preset === Preset.AngularStandalone
|
preset === Preset.AngularStandalone ||
|
||||||
|
preset === Preset.NodeServer
|
||||||
) {
|
) {
|
||||||
appName =
|
appName =
|
||||||
argv.appName ?? argv.name ?? (await determineAppName(preset, argv));
|
argv.appName ?? argv.name ?? (await determineAppName(preset, argv));
|
||||||
name = argv.name ?? appName;
|
name = argv.name ?? appName;
|
||||||
} else {
|
|
||||||
name = await determineRepoName(argv);
|
|
||||||
appName = await determineAppName(preset, argv);
|
|
||||||
if (preset === Preset.NodeServer) {
|
if (preset === Preset.NodeServer) {
|
||||||
framework = await determineFramework(preset, argv);
|
framework = await determineFramework(preset, argv);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
name = await determineRepoName(argv);
|
||||||
|
appName = await determineAppName(preset, argv);
|
||||||
}
|
}
|
||||||
style = await determineStyle(preset, argv);
|
style = await determineStyle(preset, argv);
|
||||||
}
|
}
|
||||||
@ -476,6 +480,11 @@ function determineMonorepoStyle(): Promise<string> {
|
|||||||
message:
|
message:
|
||||||
'Standalone Angular app: Nx configures Jest, ESLint and Cypress.',
|
'Standalone Angular app: Nx configures Jest, ESLint and Cypress.',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'node-server',
|
||||||
|
message:
|
||||||
|
'Standalone Node Server app: Nx configures your framework of choice (e.g. Express) along with esbuild, Eslint and Jest.',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|||||||
@ -298,6 +298,7 @@ function updateTsConfigOptions(tree: Tree, options: NormalizedSchema) {
|
|||||||
compilerOptions: {
|
compilerOptions: {
|
||||||
...shared.tsConfigBaseOptions,
|
...shared.tsConfigBaseOptions,
|
||||||
...json.compilerOptions,
|
...json.compilerOptions,
|
||||||
|
esModuleInterop: true,
|
||||||
},
|
},
|
||||||
...json,
|
...json,
|
||||||
extends: undefined,
|
extends: undefined,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user