New Business Card

New Business Card

会津 春のLT大会 2018の資料です。
GoでCLI名刺を作る話です。

F2ebf0e7d45afa728d5e4b7d697c4ce0?s=128

Koki Natsume

July 14, 2018
Tweet

Transcript

  1. NEW BUSINESS CARD 5/26 SPRING LT IN U-AIZU

  2. 1 WHO ▸natumn ▸ձ௡େֶ̏೥ੜ

  3. 2 ໊ࢗ

  4. 2 CLI ໊ࢗ

  5. 4 CLI BUSINESS CARD ▸ CUI্ʹϓϩϑΟʔϧΛදࣔ͢ΔΞϓϦ ▸ ͓खܰ ▸ ݩωλ͸

    @sindresorhus(γϯυϨ ιϦϡʔ ε)͞Μͷ “My new business card” ͷπΠʔ τ
  6. 5 CLI BUSINESS CARD

  7. 6 CLI BUSINESS CARD ▸ CUI্͔ΒϓϩϑΟʔϧΛදࣔ͢ΔΞϓϦ ▸ ͓खܰ ▸ ݩωλ͸

    @sindresorhus͞Μͷ “My new business card” ͷπΠʔτ
  8. 7 CLI BUSINESS CARD ▸ CUI্͔ΒϓϩϑΟʔϧΛදࣔ͢ΔΞϓϦ ▸ ͓खܰ ▸ ݩωλ͸

    @sindresorhus͞Μͷ “My new business card” ͷπΠʔτ ▸ npx {ύοέʔδ໊} Ͱ࣮ߦ ▸ ެ։͸github.com/sindresorhus/sindresorhus
  9. 8 NPX COMMAND ▸ npmͷύοέʔδͷμ΢ϩʔυͱ࣮ߦΛ͢ ΔCLIπʔϧ ▸ ϩʔΧϧʹ͋Δ৔߹ɺϩʔΧϧ༏ઌͰ࣮ߦ ▸ npm

    v5.2.0 ͔Βಋೖ͞Εͨ
  10. 9 CLI BUSINESS CARD $ npx natumn

  11. 10

  12. 11 ஗͍

  13. 12 ΋ͬͱγϡοͱ଎͘ද͍ࣔͤͨ͞…

  14. 13 $ gpx

  15. 14 GPX COMMAND ▸ githubͳͲͰެ։͞Ε͍ͯΔGoͷϓϩάϥϜΛ࣮ ߦ͢ΔCLIπʔϧ( https://github.com/natumn/gpx ) ▸ npxͷGo࣮૷

    (https://github.com/zkat/npx) ▸ npxͷഒҎ্ͷύϑΥʔϚϯε͕໨ඪ ▸ ex> $ gpx github.com/natumn/natumn
  16. 15 GPX COMMAND npx : ໿ 15~20ඵ gpx : ໿̍~̎ඵ

  17. 16 ͸΍͍ʂ

  18. 17 ΊͬͪΌ͸΍͍ʂ

  19. 18 ͜Ε͸gpxͰCLI business card ࡞Δ͔͠ͳ͍ʂ

  20. 19 ·ͱΊ ▸ CLI Business Card ͱ͍͏͓ख໊ܰࢗΞϓϦ ͕ྲྀߦ͍ͬͯΔ ▸ npx͕஗͍ͷͰGo൛ͷgpxΛ࡞ͬͨ

    ▸ npx, gpxͰcli ໊ࢗ࡞ͬͯ΄͍͠
  21. 20 ͝੩ௌ͋Γ͕ͱ͏ ͍͟͝·ͨ͠