Skip to content

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

Closed

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)

Activity

  1. pekevski commented on Sep 15, 2021

    @pekevski
    ContributorAuthor

    Looks like #7 tries to address the issue, however I think checking for existence covers a wider range of possibilities

  2. NathanWalker commented on Sep 15, 2021

    @NathanWalker
    Contributor

    @pekevski thanks for ping on this. I’m going to work on getting updates out by tomorrow afternoon on this.

  3. NathanWalker commented on Sep 15, 2021

    @NathanWalker
    Contributor

    Actually @pekevski i like your suggested fix better if you want to PR that? If you don’t have time no worries - I may revert the other tomorrow as I think your suggestion would cover more and be simpler.

  4. pekevski commented on Sep 15, 2021

    @pekevski
    ContributorAuthor

    Sure ill quickly do it now for you

  5. added a commit that references this issue on Sep 15, 2021
    87b6108
  6. added a commit that references this issue on Sep 15, 2021
    43e9413
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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