Skip to content

Commit

Permalink
fix(@schematics/angular): add experimental message when using standal…
Browse files Browse the repository at this point in the history
…one application schematic.

This commit adds a warning when using `ng new --standalone` and `ng generate app --standalone`.
  • Loading branch information
alan-agius4 authored and angular-robot[bot] committed Apr 5, 2023
1 parent 46125f6 commit f98c9de
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/schematics/angular/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,17 @@ import { Builders, ProjectType } from '../utility/workspace-models';
import { Schema as ApplicationOptions, Style } from './schema';

export default function (options: ApplicationOptions): Rule {
return async (host: Tree) => {
return async (host: Tree, context: SchematicContext) => {
const { appDir, appRootSelector, componentOptions, folderName, sourceDir } =
await getAppOptions(host, options);

if (options.standalone) {
context.logger.warn(
'Standalone application structure is new and not yet supported by many existing' +
` 'ng add' and 'ng update' integrations with community libraries.`,
);
}

return chain([
addAppToWorkspaceFile(options, appDir, folderName),
options.standalone
Expand Down

0 comments on commit f98c9de

Please sign in to comment.