Wednesday, 10 May 2017

How to install global packages with yarn

yarn install -h suggests that the -g (global) option is DEPRECATED. How am I supposed to indicate that I want a bunch of packages (from package.json / yarn.lock files) to be installed globally?

Options I saw:

  • yarn global [command] has things such as ls and add but not install. add only works with particular package names, if I understand correctly. I already have my yarn.lock file ready, I don't want to repeat myself on the command line.
  • yarn global add each package one by one. Now my list of packages would be imperative instead of declarative.


via jleeothon

No comments:

Post a Comment