Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Yarn, encore un package manager ? #DevoxxFR

Yarn, encore un package manager ? #DevoxxFR

C'est le dernier d'une longue liste: npm, bower, jspm... Alors qu'est-ce qui se cache derrière YARN, le package-manager JavaScript récemment open-sourcé par Facebook.

Au cours de cette session, nous essaierons de comprendre les raisons de sa création, comment il fonctionne et ce qu'il apporte de plus (ou de moins). Et finalement de répondre à LA question: Faut-il l'installer dès lundi matin, en rentrant de #DevoxxFR ?

8140a367a6c6ed81f2d09a3886f7dea7?s=128

Erwan Deruelle

April 07, 2017
Tweet

Transcript

  1. #YarnDvxx #DevoxxFR Yarn, encore un package-manager ? Erwan Deruelle @d3rwan

    1
  2. #YarnDvxx #DevoxxFR 2 Erwan Deruelle Développeur full-stack d3rwan

  3. #YarnDvxx #DevoxxFR

  4. #YarnDvxx #DevoxxFR Scaling with 4 • « It works on

    my machine »
  5. #YarnDvxx #DevoxxFR Scaling with 5 • « It works on

    my machine » • Nested dependencies
  6. #YarnDvxx #DevoxxFR Scaling with 6 • « It works on

    my machine » • Nested dependencies • Reliability
  7. #YarnDvxx #DevoxxFR Scaling with 7 • « It works on

    my machine » • Nested dependencies • Reliability • Performance
  8. #YarnDvxx #DevoxxFR Scaling with 8 • « It works on

    my machine » • Nested dependencies • Reliability • Performance • Continuous integration
  9. #YarnDvxx #DevoxxFR Introducing Yarn 9 Deterministic
 Network resilience Reliable

  10. #YarnDvxx #DevoxxFR Introducing Yarn 10 Secure Integrity Reliable Deterministic
 Network

    resilience
  11. #YarnDvxx #DevoxxFR Introducing Yarn 11 Offline mode
 Network performance
 Flat

    mode Fast Deterministic
 Network resilience Secure Integrity 11 Reliable
  12. #YarnDvxx #DevoxxFR Architecture principles 12 • Consumes package.json • Stores

    dependencies in node_modules directory • Produces yarn.lock file • Flat dependencies tree • Global cache or remote registries • Parallelizing tasks
  13. #YarnDvxx #DevoxxFR 13 yarn.lock

  14. #YarnDvxx #DevoxxFR Installation process 14 Resolving packages Fetching packages Linking

    dependencies Building fresh packages
  15. #YarnDvxx #DevoxxFR Moving to > npm install -g yarn 15

  16. #YarnDvxx #DevoxxFR Moving to // npm install > yarn //

    npm init > yarn init // npm install angular —-save > yarn add angular // npm install -—global gulp > yarn global add gulp // npm uninstall angular > yarn remove angular // npm install angular-mocks —-save-dev > yarn add angular-mocks —-dev 16
  17. #YarnDvxx #DevoxxFR Performance (according to the contributors) 17

  18. #YarnDvxx #DevoxxFR Performance (in « real » life) 18

  19. #YarnDvxx #DevoxxFR 19 • Easy migration, Seamless integration • Try

    for free • $ave tim€ • Young product • Pull competitors up
  20. #YarnDvxx #DevoxxFR 20 Thanks

  21. #YarnDvxx #DevoxxFR Resources • « Yarn, a new package-manager for

    Javascript »
 https://code.facebook.com/posts/1840075619545360 • Official website
 https://yarnpkg.com/lang/en/
 https://github.com/yarnpkg/yarn • Benchmark
 https://yarnpkg.com/en/compare
 https://github.com/d3rwan/devoxx17_quickie_yarn 21