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
Angularのライブラリ作成について /ng-kyoto-angular-meetup-8
Search
Sayaka Nakatsuka
October 06, 2018
Technology
0
460
Angularのライブラリ作成について /ng-kyoto-angular-meetup-8
ng-kyoto Angular Meetup #8 (2018/10/06) での 発表資料です。
https://ng-kyoto.connpass.com/event/100685/
Sayaka Nakatsuka
October 06, 2018
Tweet
Share
More Decks by Sayaka Nakatsuka
See All by Sayaka Nakatsuka
Angular 7 から 8にあげてみた /ng-kyoto-angular-meetup-10
sayanaka
3
2.3k
HammerGestureConfigの 浅掘り /ionic-meetup-10
sayanaka
1
370
Angular ライブラリ開発 /ng-japan-onair
sayanaka
0
210
Other Decks in Technology
See All in Technology
つくって納得、つかって実感! 大規模言語モデルことはじめ
recruitengineers
PRO
24
6.4k
.NET開発者のためのAzureの概要
tomokusaba
0
230
R-SCoRe: Revisiting Scene Coordinate Regression for Robust Large-Scale Visual Localization
takmin
0
430
広島発!スタートアップ開発の裏側
tsankyo
0
250
そのコンポーネント、サーバー?クライアント?App Router開発のモヤモヤを可視化する補助輪
makotot
4
600
Goでマークダウンの独自記法を実装する
lag129
0
220
7月のガバクラ利用料が高かったので調べてみた
techniczna
3
530
Evolution on AI Agent and Beyond - AGI への道のりと、シンギュラリティの3つのシナリオ
masayamoriofficial
0
190
DeNA での思い出 / Memories at DeNA
orgachem
PRO
3
1.6k
kintone開発チームの紹介
cybozuinsideout
PRO
0
73k
自社製CMSからmicroCMSへのリプレースがプロダクトグロースを加速させた話
nextbeatdev
0
140
あとはAIに任せて人間は自由に生きる
kentaro
3
1.1k
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.2k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
131
19k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Rails Girls Zürich Keynote
gr2m
95
14k
Writing Fast Ruby
sferik
628
62k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
570
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Building an army of robots
kneath
306
46k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.4k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.6k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Balancing Empowerment & Direction
lara
2
590
Transcript
AngularͷϥΠϒϥϦ࡞ʹ ͍ͭͯ ng-kyoto Angular Meetup #8 @sayanaka
@sayanaka • ࣾձਓ̑ʢͨͿΜʣ • JavaScript৮Γͩͯ̏͠ • લ৬ɿC#ϝΠϯͷձࣾͰͳ͔ͥ1ਓ͚ͩJSॻ͍ͯ·ͨ͠ • ࠓ݄͔Βɺ͍Ζ͍Ζ͘ઙ͘৮Δձࣾʹస৬ •
GO, Angular, React… • Ϟϒϓϩָ͍͠ʢ͚ͲΊͬͪΌർΕΔʂʣ
ͦͦ • ۀͰAngularͷϥΠϒϥϦ࡞ͬͯͨ (2016ޙʙʣ • AngularΛͬͨʮαΠτ/ΞϓϦʯͷใ͋Δ • AngularΛͬͨʮϥΠϒϥϦʯͷ։ൃใ΄΅ͳ ͍
ཁ͋Δɾɾɾ https://github.com/angular/angular-cli/ issues/1692
※ࡶͳ༁ : ɹٞ͋Γ͕ͱ͏ʂͰॾʑͷཧ༝ͰɺCLI 1.xͰ࣮Ͱ͖ͳ͍Μͩʂ https://github.com/angular/angular-cli/issues/1692#issuecomment-304970595
sayanaka͕͍͋ͨ • ͍ΖΜͳAngularϥΠϒϥϦͷϏϧυํ๏Λௐࠪ • angular-library-seed • ngx-translate • angular-calendar •
ௐࠪ݁ՌΛͱʹɺ͓ख webpack.config.tsΛ ࡞ʂ
͕͍͋ͨΜ͚ͩͲɾɾɾ • ng build௨ͬͯɺng build —-prod௨ Βͳ͍ɾɾɾ • AoTϏϧυ͕ͤͳ͍ɾɾɾ
ͦͯ͠ߟ͑ΔͷΛΊͨ • ϓϩμΫγϣϯϏϧυ͢Δͱ͖ɺ ng build —prod —aot=falseͰ❤ • όουϊϋͳͷͰྑ͍ࢠΊ·͠ΐ͏ •
@angular/
[email protected]
Ͱɺ—aotΦϓγϣϯΛՃ ͢ΔͱΤϥʔు͖·͢ɻ
ͦͷ··࣌ܦͪ2017ळ • ng-packagr ര
ng-packagr • AngularͷPackage FormatʹԊͬͯΑ͠ͳʹϏϧυͯ͠ ͘ΕΔਆϥΠϒϥϦ • v1.0.0 - 2017/08/31ϦϦʔε •
ng-package.jsonΛ༻ҙͯ͠ɺ͋ͱී௨ͷnpmϥΠϒ ϥϦͱಉ͡Α͏ͳײ֮Ͱpackage.jsonΛॻ͍ͯɺʮng- packagrʯίϚϯυୟ͚ͩ͘ʂ͍͞͠ʂ
ng-packagr
ng-packagr • ng new ~Ͱ࡞ͬͨϓϩδΣΫτ্Ͱͳ͍ͱ͍͚ͳ͍ • ʙCLI 1.x.x • appϑΥϧμͱಉ֊ʹɺϥΠϒϥϦ༻ͷϑΥϧ
μΛ࡞ͬͯͦ͜ʹίʔυల։ • ྫɿ ng-packaged
ҙ • AoTϏϧυ͕௨Βͳ͍ঢ়ଶͩͱɺϥΠϒϥϦͱͯ͠ϏϧυͰ͖ ͳ͍ • ٯʹ͍͏ͱɺϥΠϒϥϦͱͯ͠Ϗϧυ͕௨ΕɺAoT௨Δ • export * from
‘~~’ͱ͔ॻ͍ͯΔͱɺϏϧυΤϥʔΛు͘߹͕ ͋Δ • importจͰɺʮ~~/indexʯΛলུ͠ͳ͍ • ԣணͤͣɺ໌֬ʹexport { hoge, fuga } from ‘~~’ͱ͢Δ͜ͱ
ಋೖ͢Δͷ໘ͦ͘͞͏ɾɾɾ
Angular CLI 6 • 2018.05.04ϦϦʔε - ݱࡏ v6.2.4 • ઃఆϑΝΠϧ͕มΘͬͨ
• ΊͬͪΌػೳ͕૿͑ͨ
Library Support!
Angular CLI 6 • Angular CLIͱɺng-packagr͕࿈ܞ͢ΔΑ͏ʹ ͳͬͨ • ng g
library ~Λୟ͘ͱɺng-packagr͕མͪͯ͘ Δ • σϞ
·ͱΊ
·ͱΊ • ng-packagrྑ͍ͧ • Angular CLI 6.x͔Β ΊͬͪΌ؆୯ʹϥΠϒϥϦΛ࡞ΕΔΑ͏ʹ ͳ͍ͬͯΔͷͰɺͥͻͬͯΈ͍ͯͩ͘͞ʂ
͝੩ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ