Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
TypeScript + lerna + yarn monorepos FTW
Search
paul souche
October 08, 2017
Programming
1.9k
1
Share
TypeScript + lerna + yarn monorepos FTW
paul souche
October 08, 2017
More Decks by paul souche
See All by paul souche
Une API from scratch avec NestJS
paulsouche
0
170
Unit test in deno
paulsouche
0
170
One spec to rule them all
paulsouche
1
310
Analytics reverse engineering
paulsouche
0
170
Test like a boss with TypeScript
paulsouche
0
240
The internal modules strike back
paulsouche
0
130
AngularJS + Typescript === <3
paulsouche
0
350
Ma caisse enregistreuse en NodeJS
paulsouche
0
580
Other Decks in Programming
See All in Programming
実践ハーネスエンジニアリング #MOSHTech
kajitack
7
6k
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
250
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
180
20260320登壇資料
pharct
0
170
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
230
まかせられるPM・まかせられないPM / DevTech GUILD Meetup
yusukemukoyama
0
110
Xdebug と IDE による デバッグ実行の仕組みを見る / Exploring-How-Debugging-Works-with-Xdebug-and-an-IDE
shin1x1
0
350
感情を設計する
ichimichi
5
1.3k
Codex CLI でつくる、Issue から merge までの開発フロー
amata1219
0
330
事業会社でのセキュリティ長期インターンについて
masachikaura
0
230
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
3
770
安いハードウェアでVulkan
fadis
1
930
Featured
See All Featured
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
250
The agentic SEO stack - context over prompts
schlessera
0
740
Statistics for Hackers
jakevdp
799
230k
BBQ
matthewcrist
89
10k
Building an army of robots
kneath
306
46k
Six Lessons from altMBA
skipperchong
29
4.2k
Bash Introduction
62gerente
615
210k
Optimizing for Happiness
mojombo
378
71k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
160
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
The Curious Case for Waylosing
cassininazir
0
290
Transcript
TypeScript + lerna + yarn monorepos FTW Paris TypeScript #10
10/10/2017 1
Me, myself & I Paul Souche Front End developer @S_A_N_T_E_C_H
In love with TypeScript since 2014 @paul.souche paulsouche @paulsouche 2
Multi repos : why ? - Monoliths no more -
Build only the necessary - Clearer subversion history - Easier revert - 1 app > 1 repo - 1 service > 1 repo... 3
Multi repos : but ... - Switch project all the
time - Sequential builds - Evergreen anti pattern - Dependencies - Versioning - Features branch 4
- Build everything everytime - Build order - Subversion Conflicts
- Licenses 5 Did you said monorepo?
6 DEPENDENCIES APP 1 DEPENDENCIES APP 2 Projects architecture
Editor architecture 7 DEPENDENCIES COMMON 2 COMMON 1 APP 1
APP 2 APP 3 APP 4
Lerna << Lerna is a tool that optimizes the workflow
around managing multi-package repositories with git and npm >> 8
Prerequisites 9
Lerna project structure - lerna import <path to package> -
lerna bootstrap 10
What it does 11
Demo 12
Yeah… But ? - devDependencies are the same so lerna
bootstrap could be very slow for more packages (cache) - Build is sequential 13
yarn workspaces 14
Lerna config 15
What happen to the structure 16
Demo 17
Build 18 - Several flags such as --parallel I won’t
talk about - Bash is always the answer for uncommon problems
That’s all folks THANKS References Lerna Yarn workspaces Demo 19