fix(angular): fix angular projects not being standalone when all other projects are standalone (#6641)
This commit is contained in:
parent
3e3794c52c
commit
c13c02d27e
@ -101,10 +101,7 @@ export async function applicationGenerator(
|
||||
setApplicationStrictDefault(host, false);
|
||||
}
|
||||
|
||||
if (
|
||||
options.standaloneConfig ||
|
||||
getWorkspaceLayout(host).standaloneAsDefault
|
||||
) {
|
||||
if (options.standaloneConfig) {
|
||||
await convertToNxProjectGenerator(host, {
|
||||
project: options.name,
|
||||
all: false,
|
||||
|
||||
@ -10,7 +10,7 @@ export function normalizeOptions(
|
||||
host: Tree,
|
||||
options: Partial<Schema>
|
||||
): NormalizedSchema {
|
||||
const { appsDir, npmScope } = getWorkspaceLayout(host);
|
||||
const { appsDir, npmScope, standaloneAsDefault } = getWorkspaceLayout(host);
|
||||
|
||||
const appDirectory = options.directory
|
||||
? `${names(options.directory).fileName}/${names(options.name).fileName}`
|
||||
@ -31,6 +31,8 @@ export function normalizeOptions(
|
||||
|
||||
const defaultPrefix = npmScope;
|
||||
|
||||
options.standaloneConfig = options.standaloneConfig || standaloneAsDefault;
|
||||
|
||||
// Set defaults and then overwrite with user options
|
||||
return {
|
||||
style: 'css',
|
||||
|
||||
@ -27,7 +27,7 @@ export function normalizeOptions(
|
||||
? `${names(options.directory).fileName}/${name}`
|
||||
: name;
|
||||
|
||||
const { libsDir, npmScope } = getWorkspaceLayout(host);
|
||||
const { libsDir, npmScope, standaloneAsDefault } = getWorkspaceLayout(host);
|
||||
|
||||
const projectName = projectDirectory.replace(new RegExp('/', 'g'), '-');
|
||||
const fileName = options.simpleModuleName ? name : projectName;
|
||||
@ -40,6 +40,8 @@ export function normalizeOptions(
|
||||
const modulePath = `${projectRoot}/src/lib/${fileName}.module.ts`;
|
||||
const defaultPrefix = npmScope;
|
||||
|
||||
options.standaloneConfig = options.standaloneConfig || standaloneAsDefault;
|
||||
|
||||
const importPath =
|
||||
options.importPath || `@${defaultPrefix}/${projectDirectory}`;
|
||||
|
||||
|
||||
@ -69,10 +69,7 @@ export async function libraryGenerator(host: Tree, schema: Partial<Schema>) {
|
||||
setStrictMode(host, options);
|
||||
await addLinting(host, options);
|
||||
|
||||
if (
|
||||
options.standaloneConfig ||
|
||||
getWorkspaceLayout(host).standaloneAsDefault
|
||||
) {
|
||||
if (options.standaloneConfig) {
|
||||
await convertToNxProjectGenerator(host, {
|
||||
project: options.name,
|
||||
all: false,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user