Yarn: Support `yarn package` and `yarn install --local` like bundler

Created on 19 Oct 2016  路  3Comments  路  Source: yarnpkg/yarn

Do you want to request a _feature_ or report a _bug_?

Feature

Desired behavior

Bundler supports 'vendoring' dependencies out of the box with the bundle package command. This command saves your gems as .gem files into your repo at vendor/cache. You can install from the saved versions using bundle install --local.

http://bundler.io/v1.13/bundle_package.html

This is really handy for deployment and also allows one to be able to do docker builds from a fresh checkout of your application. This is particularly handy if you depend on private packages, and don't want to leak secrets, like git or npm credentials, into your docker image layers.

To get this behaviour on node our team currently use shrinkpack, but a more integrated solution would be ideal. This would help us take advantage of the power of Yarn, whilst still being able to bundle our node packages in our repo.

Most helpful comment

Sorry guys, my blog post about this feature is in the last phases.
Once I release 0.17.1, I'll push it through.
It will be published on the website

All 3 comments

A related discussion that may be of interest can be found in #393.

The way I read that discussion, it sounds like the yarn-offline-mirror setting already does this to some extent..? I can't find any documentation for it though.

Maybe @bestander could shine some light on the current behaviour? They seem to have a solid understanding of what the offline mirror can & can't currently do. :)

Sorry guys, my blog post about this feature is in the last phases.
Once I release 0.17.1, I'll push it through.
It will be published on the website

Thanks @bestander!

I just read through https://yarnpkg.com/blog/2016/11/24/offline-mirror and it looks like it solves our exact problem.

Was this page helpful?
0 / 5 - 0 ratings