Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get cordova to use yarn js instead of npm for adding plugins

Question updated

I currently add plugins to my cordova project using the command cordova plugin add x. I believe this uses npm in the background.

Does anyone have any idea how I can switch npm out for yarn js (within cordova, I want cordova to use yarn instead of npm), since it would make such a massive difference in terms of caching (other than updating the cordova cli myself).

Conclusion

Dec 2016

It seems that installing yarn means that yarn takes over from npm as the default package manager, and thus things are speeded up by default and that no tinkering with Cordova is required.

Sep 2017

It seems that I was mistaken, apparently, Cordova is hardcoded to use npm, https://issues.apache.org/jira/browse/CB-12242. I will re-open this issue to request Apache to make this an option.

like image 806
IonicBurger Avatar asked Dec 13 '16 16:12

IonicBurger


1 Answers

It seems the short answer is no - it is not currently possible, but I am going to request an update from Apache: https://issues.apache.org/jira/browse/CB-12242

like image 64
IonicBurger Avatar answered Sep 20 '22 18:09

IonicBurger