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

chore: Enable yarn package management #484

Merged
merged 8 commits into from
Apr 5, 2017
Merged

chore: Enable yarn package management #484

merged 8 commits into from
Apr 5, 2017

Conversation

joshwiens
Copy link
Contributor

@joshwiens joshwiens commented Apr 4, 2017

Description

Enables the use of the Yarn package manager in a limited fashion.

What's included?

  • Adds a yarn.lock file, treated as a binary using .gitattributes ( prevents merge conflict hell )
  • Modifies .travis.yml to install using yarn
    • Adds a rebuild step for node-sass. Issue documented in build file & readme.
    • yarn install saves 40 - 50 seconds on the install, ~6 of which are lost on the rebuild.
  • Modifies .travis.yml to build only develop & master plus any open pull request
    • Currently all your builds are running twice. Call it a courtesy to Travis :)
  • Picks up latest PhantomJS for Installing phantomjs-prebuilt fails due to no npm_config_tmp yarnpkg/yarn#1538
    • *nix related tmp directory / permissions problem in phantom / yarn.

General Tests for Every PR

  • ng serve --aot still works.
  • npm run lint passes.
  • npm test passes and code coverage is not lower.
  • npm run build still works.
A note about using yarn.

Speed & deterministic install benefits aside, using Yarn comes with a bit of baggage. The lock file is something that has to be maintained to be of any real value.

Any PR that changes a package version will also have to update the lock file accordingly. Simplest way to do that is to make the changes via yarn, optionally you can use npm and rm -rf yarn.lock && yarn install to pick up the dependency changes in the pull request.

The lock file is then committed along with any other versioned file. Certainly not a major issue but it is something that has to become part of the development process at the maintainer level.

Closes #313

@emoralesb05 emoralesb05 added this to the Beta 3 milestone Apr 4, 2017
@emoralesb05
Copy link
Contributor

Awesome @d3viant0ne ! No more double builds 💥

@joshwiens
Copy link
Contributor Author

Sorry about the delay, completely forgot about #313 until I looked at the beta.3 milestone :)

@emoralesb05 emoralesb05 merged commit 12ea9c4 into Teradata:develop Apr 5, 2017
@emoralesb05
Copy link
Contributor

w00t, thanks again!

@joshwiens joshwiens deleted the d3viant0ne-EnableYarn branch April 5, 2017 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants