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
440
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.2k
HammerGestureConfigの 浅掘り /ionic-meetup-10
sayanaka
1
350
Angular ライブラリ開発 /ng-japan-onair
sayanaka
0
200
Other Decks in Technology
See All in Technology
多領域インシデントマネジメントへの挑戦:ハードウェアとソフトウェアの融合が生む課題/Challenge to multidisciplinary incident management: Issues created by the fusion of hardware and software
bitkey
PRO
2
110
KnowledgeBaseDocuments APIでベクトルインデックス管理を自動化する
iidaxs
1
280
3年でバックエンドエンジニアが5倍に増えても破綻しなかったアーキテクチャ そして、これから / Software architecture that scales even with a 5x increase in backend engineers in 3 years
euglena1215
9
3.3k
組織に自動テストを書く文化を根付かせる戦略(2024冬版) / Building Automated Test Culture 2024 Winter Edition
twada
PRO
18
5.4k
20241214_WACATE2024冬_テスト設計技法をチョット俯瞰してみよう
kzsuzuki
3
670
re:Invent 2024 Innovation Talks(NET201)で語られた大切なこと
shotashiratori
0
320
10個のフィルタをAXI4-Streamでつなげてみた
marsee101
0
180
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
540
1等無人航空機操縦士一発試験 合格までの道のり ドローンミートアップ@大阪 2024/12/18
excdinc
0
180
Work as an App Engineer
lycorp_recruit_jp
0
350
5分でわかるDuckDB
chanyou0311
10
3.3k
Google Cloud で始める Cloud Run 〜AWSとの比較と実例デモで解説〜
risatube
PRO
0
120
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
A Philosophy of Restraint
colly
203
16k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Building Adaptive Systems
keathley
38
2.3k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Optimising Largest Contentful Paint
csswizardry
33
3k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
Embracing the Ebb and Flow
colly
84
4.5k
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͔Β ΊͬͪΌ؆୯ʹϥΠϒϥϦΛ࡞ΕΔΑ͏ʹ ͳ͍ͬͯΔͷͰɺͥͻͬͯΈ͍ͯͩ͘͞ʂ
͝੩ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ