Tracking: Third party NPM replacements
See original GitHub issueIn the recent weeks, multiple have requested support for the following two NPM replacements:
-
yarn
, which has a lot of speed improvements. Many users reported problems using yarn with the CLI in some occasions. -
cnpm
, which uses an NPM cache specially made for China. It’s not useful for anyone outside of China itself.
What I suggest is embracing the fact that users can have an angular-cli.json
file in their home folder to specify which NPM replacement they want to use.
Something like adding to the configuration:
{ // ...
"packageManager": "npm" // or "cnpm" or "yarn"
}
And having special code for some of them when the user creates a new package.
I think this is the cleanest way to do it. If we document it well, users won’t have a problem. They can even replace its value per-project.
cc @IgorMinar
Issue Analytics
- State:
- Created 7 years ago
- Reactions:6
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Top 10 npm Alternatives & Competitors - G2
Top 10 Alternatives to npm · NuGet · Ninite · Nexus Repository Manager · JFrog Artifactory · Github Package Registry · Helix Core...
Read more >List of Best SolarWinds NPM Alternatives & Competitors 2022
Best SolarWinds NPM Alternatives for Medium-sized Companies · Nmap · Intermapper · NinjaOne · ThousandEyes · Auvik · LogicMonitor · Icinga · PRTG....
Read more >JavaScript package managers compared: npm, Yarn, or pnpm?
It is a drop-in replacement for npm, so if you have an npm project, ... often a third-party command can be used, via...
Read more >Replacing Real Dependencies with Test Doubles - GitHub
Even though testdouble.js does support replacing third-party npm modules, it is not recommended unless you own the module! Typically, when practicing the ...
Read more >react-tracking - npm
Declarative tracking for React apps.. Latest version: 9.3.0, last published: 7 days ago. Start using react-tracking in your project by ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Discussing this more with @IgorMinar, we came to the point where the following would be acceptable:
ng new
, if we detect eitheryarn
orcnpm
, we output a warning message to users, telling them they canng set --global packageManager=yarn
to use it globally with new projects.yarn install
locally instead.NPM is only used when running
init
andnew
, and sinceinit
is used bynew
we should just put the warning oninit
.TL;DR: