marionettejs / marionettejs.com

:triangular_flag_on_post: Source files for the Marionette site
https://marionettejs.com
MIT License
26 stars 32 forks source link

Investigation about using yarn #489

Closed denar90 closed 7 years ago

denar90 commented 8 years ago

Should we replace npm-shrinkwrap.json by yarn.lock? Do we have to just update npm-shrinkwrap.json? How much faster it would be using yarn (make some tests)?

scott-w commented 8 years ago

From experience on different projects, yarn is really nice. I've never used npm-shrinkwrap so I've got no basis for comparison on that front but I've noticed yarn is way faster than npm i.

peterblazejewicz commented 8 years ago

@denar90 The entire idea behind this client was to minimize the time taken to install or update dependencies or make sure that they are locked correctly. When you go with this, I think you should verify that shrinkwrap was created with dev, so the yarn could recreate similar dependency tree. Then make sure in install scripts that yarn in correct version is installed so postinstall script is run (and eventually address the postinstall script in package.json as it is also area covered by yarn) 👍

vasiliy-pdk commented 7 years ago

When I tried to deploy the system locally a couple of days before it took pretty long. I did not do any measurements but more than 5 minutes with no success. Then I removed npm-shrinkwrap.json and it took more than an hour. I had to leave my laptop enabled and went to sleep :)

I've just tried yarn. It took 87 seconds to fetch all deps and more 13 seconds to fetch git submodule.

vasiliy-pdk commented 7 years ago

However, I did not perform $ yarn cache clean which may also affect measuring time. So, yeah not so easy to collect real measurements :)

JSteunou commented 7 years ago

It's easier to compare if you clear your cache before each install :)