Dsek-LTH/Website-prev

Regarding npm users

Opened this issue · 9 comments

Produce a package-lock.json to ensure npm users get correct dependencies

Isn't this the same as the yarn.lock? (use yarn instead of npm?)

@VictorWinberg I use yarn. But I don't think everyone does, sadly. And I don't think npm takes the yarn.lock into account, correct me if I'm wrong.

Keeping two lockfiles in sync would be messy (I'm guessing).

Travis/CI conf would be simpler if we used package-lock.json since npm is preinstalled. I think new contributors shouldn't have to install yarn either in order to contribute. Gotta keep those barriers to entry low.

screen shot 2017-07-03 at 18 20 06

screen shot 2017-07-03 at 18 19 38

Unfortunately the time it takes to install yarn is longer than that difference.

Btw, how much of that time difference is due to Yarn using the lockfile and npm not picking it up and having to resolve dependencies? Did you clear node_modules in between? Which version of npm are you using? npm v5 and up should auto-generate a lockfile I think.

Edit: Apparently npm got a lot faster in v5.
tmp_7550-screenshot_2017-07-03-19-44-46-1969370140

Har NPM löst så det automagiskt stödjer lockfiles? Eller är det något man måste ange explicit?

screen shot 2017-07-03 at 20 15 50

27801061-55a95780-601c-11e7-8b1b-69b4889663f3

Both with lockfiles. The speed does not really matter to me. If there is no explicit reason why Yarn is better than NPM, i am onboard @ErikBjare

@joelklint Since npm 5 it automatically supports lockfiles.