Juan Herrera
Google Developer Expert in Angular & Web Technologies
@jdjuan
"The world of tomorrow is shaped by the products we build today"
Improve our past
Design our future
How to create libraries to support and improve
our ecosystem
or your company's
3 Parts
1. Why do I need a library anyway?
2. How do I use them in Angular?
3. Show me what you got!
1. Why do I need a library anyway?
Reason #1
OSS
YOU
OSS Rockstar
Reason #2
Because you have to
Company
https://www.eclipsezone.com//articles/lattix-dsm/?source=archives
Reusability
Taking us to Mars
Write once...
...use everywhere
Fix once...
...fix everywhere
Unit test once...
...unit test everywhere
2. How do I use them in Angular?
Compatibility
1. Platforms
2. TypeScript
3. AOT
Scenario #1
UMD
FORMAT
Scenario #2
FESM5
FORMAT
FESM5
Flat + ESM + ES5
#1 Flat
#3 ES5
#2 ESM
Scenario #3
Optimized
Closure Compiler
FESM2015
FORMAT
FESM2015
Flat + ESM + ES2015
#1 Flat
#3 ES2015
#2 ESM
1. UMD
2. FESM5
3. FESM2015
1. Platforms
2. TypeScript
3. AOT
Typings
ESM + d.ts
1. Platforms
2. TypeScript
3. AOT
AOT
.metadata.json
1. Platforms
2. TypeScript
3. AOT
SUPER COMPATIBLE!
SHOW ME WHAT
YOU GOT
@jvandemo
@davidh_23
@caroso1222
FOR MORE DETAILS
THANK YOU!
By Juan Herrera