Skip to content

Please add ng add -D package-name for Christ sake #23488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 15 tasks
kasir-barati opened this issue Jul 1, 2022 · 6 comments
Closed
1 of 15 tasks

Please add ng add -D package-name for Christ sake #23488

kasir-barati opened this issue Jul 1, 2022 · 6 comments

Comments

@kasir-barati
Copy link

🚀 Feature request

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Description

This feature addressed here too:

And IDK why not in official doc we have anything not anywhere else. So I decided to be the hero and open this feature request again to see what's going on from 2019 up until now, 2022 that we have not it, yet.

Describe the solution you'd like

I have no solution except using npm or pnpm directly which I do not like when we have a wiry worrier named ng add

Describe alternatives you've considered

No solution. Nothing. Just the good ng add

@alan-agius4
Copy link
Collaborator

alan-agius4 commented Jul 1, 2022

The dependency is saved based on how the package author decides that it should be used.

See: https://angular.io/guide/schematics-for-libraries#define-dependency-type

Also, please mind the language that you use. See: https://github.com/angular/angular-cli/blob/main/CONTRIBUTING.md

@alan-agius4 alan-agius4 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 1, 2022
@kasir-barati
Copy link
Author

kasir-barati commented Jul 2, 2022

@alan-agius4 👌 Thanks. I just was a little informal 😅. No problem. I will follow the code of conduct. However I liked to see more readily interface just like what I described, a flag not a configuration. You know what I mean, It is to tedious to open package.json and change it each time that I wanna install a new package.

@alan-agius4
Copy link
Collaborator

That’s actually not for you to configure. That setting must be set by the package author in their package.json. This is because in the majority of the cases the author of the package knows if the dependency should be saved as a dev dependency, dependency or not saved at all.

@kasir-barati
Copy link
Author

@alan-agius4 Gotcha. Really cool.

Side note but IMO related to this feature request if we call it feature: Now it seems a little better, However as you know we are developers and I think most of the times we wanna go on ourselves

@alan-agius4
Copy link
Collaborator

However as you know we are developers and I think most of the times we wanna go on ourselves

That doesn’t necessarily end in the best outcome though. As an example @angular/pwa should never be saved as dev dependency or dependency and as I library author I know that, but other users might not know that.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants