Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions packages/plugin-tools/src/generators/remove-package/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function (tree: Tree, schema: Schema) {
const demoAppRoot = getDemoAppRoot(t);
removeDemoFiles(tree, t, demoAppRoot);
removeFromDemoIndex(tree, t, demoAppRoot);
updateDemoDependencies(tree, demoAppRoot);
updateDemoDependencies(tree, t, demoAppRoot);
}

removeSharedDemoFiles(tree);
Expand Down Expand Up @@ -120,7 +120,7 @@ function removeFromDemoIndex(tree: Tree, type: SupportedDemoType, demoAppRoot: s
resetAngularIndex(tree);
resetAngularRoutes(tree);
return tree;
} else if (['react', 'svelte', 'vue']) {
} else if (['react', 'svelte', 'vue'].includes(type)) {
// TODO: add index page for these flavors
return tree;
}
Expand Down Expand Up @@ -168,7 +168,12 @@ export function resetAngularRoutes(tree: Tree) {
tree.write(angularRouteModulePath, angularRouteModule);
}

export function updateDemoDependencies(tree: Tree, demoAppRoot: string) {
export function updateDemoDependencies(tree: Tree, type: SupportedDemoType, demoAppRoot: string) {
if (['react', 'svelte', 'vue'].includes(type)) {
// TODO: add index page for these flavors
return;
}

const packagePath = `${demoAppRoot}/package.json`;

updateJson(tree, packagePath, (json) => {
Expand Down