-
Notifications
You must be signed in to change notification settings - Fork 141
Switch to yarn #561
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
Switch to yarn #561
Conversation
8e57e93
to
64e36ff
Compare
@alexpelan @jwang1919 WDYT? |
@outoftime I've never used yarn before. What's your experience so far with it? |
@jwang1919 word, it’s really new! but we switched over at Genius a couple of weeks ago and I’m really happy with it. The main selling points are:
Big blog post here, and the home page has some good TL;DR on why it’s good |
Sounds good. After doing a trial run, I'm getting an error regarding
Found this, not sure if we can set this on the project level: yarnpkg/yarn#789 Stacktrace:
|
Arggh still couldn't get it to work. Tried removing Also found that the issue might not have been fixed: yarnpkg/yarn#1059 |
@jwang1919 yarnpkg/yarn#1059 suggests that maybe |
Make Webpack configuration less sensitive to the specific layout of `node_modules`. Extracted from popcodeorg#561, which may need to be put on hold until yarn properly handles optional dependencies. Most usefully, changes the logic for loading stylelint rule modules—only load rules that are whitelisted, instead of loading all rules unless they’re blacklisted. Rules themselves often have external library dependencies, so this trims down the gzipped bundle size of the linter bundle from 415K to 355K.
Make Webpack configuration less sensitive to the specific layout of `node_modules`. Extracted from popcodeorg#561, which may need to be put on hold until yarn properly handles optional dependencies. Most usefully, changes the logic for loading stylelint rule modules—only load rules that are whitelisted, instead of loading all rules unless they’re blacklisted. Rules themselves often have external library dependencies, so this trims down the gzipped bundle size of the linter bundle from 415K to 355K.
Make Webpack configuration less sensitive to the specific layout of `node_modules`. Extracted from popcodeorg#561, which may need to be put on hold until yarn properly handles optional dependencies. Most usefully, changes the logic for loading stylelint rule modules—only load rules that are whitelisted, instead of loading all rules unless they’re blacklisted. Rules themselves often have external library dependencies, so this trims down the gzipped bundle size of the linter bundle from 415K to 355K.
@outoftime Tried adding sigh Windows problems =( Update. Tried to be very thorough with this and tested all combinations of |
Damn @jwang1919 that really sucks! Yarn is so much better! OK well I will put this on hold and keep an eye on yarnpkg/yarn#1059 |
@jwang1919 I don’t suppose you have any interest in developing in an Ubuntu VM : ) |
@@ -0,0 +1,7589 @@ | |||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regenerate this file. After updating to yarn v.0.18.0 this file changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
disregard.
@@ -136,13 +136,14 @@ | |||
"karma-webpack": "^1.8.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review is not for this line of code but for lines 87-93. I had to change to the following this get it to work:
"scripts": {
"postinstall": "\"\"./node_modules/.bin/bower\"\" install",
"pretest": "npm run lint",
"test": "\"\"./node_modules/.bin/karma\"\" start --single-run --no-auto-watch",
"autotest": "\"\"./node_modules/.bin/karma\"\" start --no-single-run --auto-watch",
"lint": "\"\"./node_modules/.bin/eslint\"\" --ext .js,.jsx --plugin react src"
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, your recent changes fixed this issue.
Okay after much waiting I can confirm that upgrading yarn to v0.18.0 will indeed pass |
This happened for some reason. I like it.
I don’t think they’re necessary and they mess up Windows
`image-webpack-loader` contains a bunch of image processing libraries as dependencies, most of which we don’t need. gifsicle in particular is causing problems trying to install via yarn on Windows. Swap in `svgo-loader`, which just wraps `svgo`, the only actual image processor we needed.
We depend on `svgo` via `svgo-loader`, not directly, so there’s no need to have it as an explicit dependency in `package.json`.
Travis [now officially supports yarn](https://blog.travis-ci.com/2016-11-21-travis-ci-now-supports-yarn), so we can just rely on its detection of `yarn.lock` and use the shorthand for caching.
Switches to using Yarn for package management. Yarn is the cool new NPM.
Changes:
npm-shrinkwrap.json
foryarn.lock
Fixes #393