Skip to content

remove-package tool doesn't work off current plugin-seed #8

@pekevski

Description

@pekevski

Looks like the plugin seed only has demos for plain/ts and angular apps in the /apps directory. So when a developer npm run add's a plugin it will only get added / removed from the following directories:

/apps/demo
/apps/demo-angular

Looks like the remove-package code loops through all flavours of demo without actually checking they exist in the file tree.

Would the appropriate fix be to

  1. Add all the demo flavours to /app with a package.json; or
  2. Add something like:
for (const t of getDemoTypes()) {
    const demoAppRoot = getDemoAppRoot(t);
    if (tree.exists(demoAppRoot)) {
        removeDemoFiles(tree, t, demoAppRoot);
        removeFromDemoIndex(tree, t, demoAppRoot);
        updateDemoDependencies(tree, demoAppRoot);
    }
}

to packages/plugin-tools/src/generators/remove-package/index.ts?

(Happy to make the fix based on the best way forward as well)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions