Skip to content

Commit

Permalink
Merge pull request #1156 from nxext/fix-app-files
Browse files Browse the repository at this point in the history
fix(ionic-angular): correctly remove app files
  • Loading branch information
edbzn authored Dec 4, 2024
2 parents 7b95012 + 7a4d78a commit e42b606
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ describe('configuration schematic', () => {
);
});

it('should remove app files', async () => {
await configurationGenerator(host, options);

expect(
host.exists(`${projectRoot}/src/app/nx-welcome.component.ts`)
).toBeFalsy();
expect(host.exists(`${projectRoot}/src/app/app.config.ts`)).toBeFalsy();
});

it('should update assets in project configuration', async () => {
await configurationGenerator(host, options);
const project = readProjectConfiguration(host, appName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,7 @@ export function addFiles(host: Tree, options: NormalizedOptions) {
export function removeFiles(host: Tree, options: NormalizedOptions) {
host.delete(`${options.projectRoot}/public/favicon.ico`);
host.delete(`${options.projectRoot}/src/favicon.ico`);
host.delete(`${options.projectRoot}/src/app`);
for (const child of host.children(`${options.projectRoot}/src/app`)) {
host.delete(`${options.projectRoot}/src/app/${child}`);
}
}

0 comments on commit e42b606

Please sign in to comment.