Travis CI now supports Yarn
Yarn is a new npm-compatible package manager for Node.js.
Developed at Facebook in collaboration with Exponent, Google, and Tilde, Yarn is a great example of how the community came together to tackle the hard problem that is package management.
Today, we are thrilled to announce that Yarn is now supported on Travis CI.
How does it work?
If your Node.js project has the
yarn.lock file in the repository root,
we proceed to install Yarn and execute the
yarn command instead of
Please note that, at this time, Yarn is not yet pre-installed on our
This means that, if
yarn.lock does not exist in the expected location,
you are responsible for installing Yarn yourself.
( See this GitHub issue comment
for a workaround.)
Caching with Yarn
We also added a handy directive to cache
$HOME/.yarn-cache for your
To do this, just add:
and equivalently, along with other caching directives:
cache: yarn: true directories: - node_modules
For more information, head on over to our Node.js documentation.