Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decrease yarn size (21 MB, 171 dependency)? #878

Closed
nodkz opened this issue Oct 12, 2016 · 5 comments
Closed

Decrease yarn size (21 MB, 171 dependency)? #878

nodkz opened this issue Oct 12, 2016 · 5 comments

Comments

@nodkz
Copy link

nodkz commented Oct 12, 2016

Do you want to request a feature or report a bug?
feature

What is the current behavior?
21 MB, 171 dependency

What is the expected behavior?
I don't know cool or not that package manager has so many dependencies.


Maybe bundle dependencies with tree-shaking?

PS. Trying to add yarn to official node docker image:
nodejs/docker-node#243

@sebmck
Copy link
Contributor

sebmck commented Oct 12, 2016

This is easier said than done. We have a 2MB single JavaScript script you can use if you want, that's available here from the releases page. All the dependencies we use are critical or would be worse if we wrote them ourselves. This issue isn't very specific so I'm going to close it.

@sebmck sebmck closed this as completed Oct 12, 2016
@rjmunro
Copy link
Contributor

rjmunro commented Oct 12, 2016

The 2Mb single file solution seems to be some sort of bundle - exactly what this bug is asking for.

@nodkz
Copy link
Author

nodkz commented Oct 12, 2016

One problem stays:
how to provide CLI from this bundled js in the docker container?

@rjmunro
Copy link
Contributor

rjmunro commented Oct 12, 2016

It would be good if that download had a shebang line at the top, something like:

#!/usr/bin/env node

Then you could just copy it to /usr/local/bin or a similar folder. But in the absense of that add a file called yarn with content like:

#!/bin/bash
node path/to/yarn.js "$@"

@Daniel15
Copy link
Member

We do include a number of files that aren't needed though. I want to clean up what we can at some point, and avoid including things like example files and readmes for third-party modules in our tarballs / installers. Filed #908 for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants