Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Angularのライブラリ作成について /ng-kyoto-angular-meetup-8

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

More Decks by Sayaka Nakatsuka

Other Decks in Technology

Transcript

  1. ng-packagr • AngularͷPackage FormatʹԊͬͯΑ͠ͳʹϏϧυͯ͠ ͘ΕΔਆϥΠϒϥϦ • v1.0.0 - 2017/08/31ϦϦʔε •

    ng-package.jsonΛ༻ҙͯ͠ɺ͋ͱ͸ී௨ͷnpmϥΠϒ ϥϦͱಉ͡Α͏ͳײ֮Ͱpackage.jsonΛॻ͍ͯɺʮng- packagrʯίϚϯυୟ͚ͩ͘ʂ΍͍͞͠ʂ
  2. ஫ҙ఺ • AoTϏϧυ͕௨Βͳ͍ঢ়ଶͩͱɺϥΠϒϥϦͱͯ͠ϏϧυͰ͖ ͳ͍ • ٯʹ͍͏ͱɺϥΠϒϥϦͱͯ͠Ϗϧυ͕௨Ε͹ɺAoT΋௨Δ • export * from

    ‘~~’ͱ͔ॻ͍ͯΔͱɺϏϧυΤϥʔΛు͘৔߹͕ ͋Δ • importจͰɺʮ~~/indexʯΛলུ͠ͳ͍ • ԣணͤͣɺ໌֬ʹexport { hoge, fuga } from ‘~~’ͱ͢Δ͜ͱ
  3. Angular CLI 6 • Angular CLIͱɺng-packagr͕࿈ܞ͢ΔΑ͏ʹ ͳͬͨ • ng g

    library ~Λୟ͘ͱɺng-packagr͕མͪͯ͘ Δ • σϞ