React Native & monorepo

React Native & monorepo

E86b46be0f4e61db6b28becc5493bbab?s=128

januswel

June 25, 2017
Tweet

Transcript

  1. REACT NATIVE & MONOREPO REACT NATIVE MEETUP@໊ݹ԰৓ BY JANUSWEL

  2. JANUSWEL have developed on native iOS/Android janus_wel januswel

  3. DOMAIN LAYER https://speakerdeck.com/januswel/marutipuratutohuomushi-dai- false-javascript-x-react-zhan-lue

  4. FORMATION

  5. MONOREPO BY LERNA https://github.com/lerna/lerna

  6. MONOREPO BY LERNA my-lerna-repo/ package.json packages/ package-1/ package.json package-2/ package.json

  7. MONOREPO PROS & CONS Pros Cons • Single lint, build,

    test and release process. • Easy to coordinate changes across modules. • Single place to report issues. • Easier to setup a development environment. • Tests across modules are ran together which finds bugs that touch multiple modules easier. • Codebase looks more intimidating. • Repo is bigger in size. • Lower ranking in npms results. At least until npms-io/npms- analyzer#83 is fixed. • ??? https://github.com/babel/babel/blob/master/doc/design/ monorepo.md
  8. MONOREPO BY LERNA my-lerna-repo/ package.json packages/ package-1/ package.json node_modules/package-2 package-2/

    package.json symlink
  9. BUT… React Native was not capable to resolve symlink!! ʙ

    0.44.x
  10. FAILING RELEASE BUILD

  11. @0.45.0 Resolving symlink is available!! https://react-native.canny.io/feature-requests/p/symlink- support-for-packager

  12. SAMPLE https://github.com/januswel/monorepo-ddd-rn janus@jpro$ pwd /Users/janus/work/dev/experiments/ddd-monorepo/packages janus@jpro$ tree -L 1 .

    ᵓᴷᴷ MonorepoApp ᵋᴷᴷ monorepo-domain React Native Domain
  13. SAMPLE https://github.com/januswel/monorepo-ddd-rn

  14. SUCCESS!!

  15. THANKS!!