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

OSS作者はじめの一歩

Nozomu Ikuta
December 07, 2022

 OSS作者はじめの一歩

2022年12月7日 Saitama.js vol.4 にて発表したLT資料です。

Presented in Saitama.js vol.4, 7th Dec. 2022.

Nozomu Ikuta

December 07, 2022
Tweet

More Decks by Nozomu Ikuta

Other Decks in Technology

Transcript

  1. Nozomu Ikuta 7th Dec. 2022
    OSS࡞ऀ͸͡ΊͷҰา
    What I Learned by being an OSS Author

    View full-size slide

  2. ΞδΣϯμ
    📝 Agenda
    ࣗݾ঺հ

    h3-corsύοέʔδͷ঺հ

    unjsʹ͍ͭͯ

    h3-cors͕Ͱ͖Δ·Ͱ

    h3-corsΛެ։ͨ݁͠Ռ

    ·ͱΊ

    View full-size slide

  3. ࣗݾ঺հ
    🙋 About Me
    • Twitter / GitHub : ˏNozomuIkuta

    • ιϑτ΢ΣΞΤϯδχΞ at Global Brain

    • Vue.js೔ຊϢʔβʔάϧʔϓίΞελοϑ

    • unjsϝϯόʔ

    View full-size slide

  4. ৺ͷ੠
    “OSSެ։ͯ͠Έ͍ͨɺ͚ͲԿΛ͢Ε͹🥲”

    View full-size slide

  5. This lightning talk is for you.
    ΍ͬͯΈͨ

    View full-size slide

  6. h3-corsύοέʔδͷ঺հ

    View full-size slide

  7. h3-corsͱ͸
    🚦 What h3-cors is
    • unjs/h3༻ͷCORSϛυϧ΢ΣΞ

    • Express.js CORSͷ୅ସ

    View full-size slide

  8. ৺ͷ੠
    “unjs? h3?🤔”

    View full-size slide

  9. unjsʹ͍ͭͯ

    View full-size slide

  10. unjsͱ͸
    👀 What unjs is
    • ʮUni
    fi
    ed JavaScript Toolsʯͷུ

    • ؀ڥඇґଘͷύοέʔδ܈

    • Nuxt 3Λ࣮ݱ͍ͯ͠ΔίΞ

    • ʮnitroʯͷ؅ཧओମ

    View full-size slide

  11. h3ͱ͸
    👀 What h3 is
    • ʮHTTPʯͷψϝϩχϜ

    • Nuxt 3ͷαʔόʔαΠυʢnitroͷ಺෦ʣͰϛυϧ΢ΣΞΛ୲͏

    • Nuxt 2Ͱ͸connect / Expressͩͬͨ΋ͷ͕ஔ͖׵Θͬͨ

    View full-size slide

  12. ͳͥh3-corsΛ͔ͭͬͨ͘
    💡Why I created h3-cors
    • h3Ͱ͸Expressͷϛυϧ΢ΣΞʹҰ෦ޓ׵ੑ͕ͳ͔ͬͨ

    • ʮh3ͰCORSΛ࣮ݱ͢Δʹ͸ʯͱ͍͏IssueΛݟ͚ͭͨ

    • ίΞϝϯόʔ͕๩ͦ͠͏ͳͷͰɺࣗ෼͕΍ͬͯΈΔ͜ͱʹͨ͠

    • OSSߩݙ͚ͩͰ͸ͳ͘ɺOSSެ։Λ΍ͬͯΈ͔ͨͬͨʢҰ൪ͷཧ༝ʣ

    View full-size slide

  13. h3-cors͕Ͱ͖Δ·Ͱ

    View full-size slide

  14. 2022೥ɺळɻ
    “CORSɺงғؾͰ΍ͬͯ·ͨ͠”

    View full-size slide

  15. 2022೥ɺळɻ
    “ϥΠϒϥϦͷηοτΞοϓ͕Θ͔Βͳ͍”

    View full-size slide

  16. 2022೥ɺळɻ
    “ެ։ͯ͠΋࢖ΘΕͳ͍ͷͰ͸ʁ”

    View full-size slide

  17. ʮCORSɺงғؾͰ΍ͬͯ·ͨ͠ʯ
    🧭 Road to h3-cors
    • MDNͰҰ͔Βษڧ

    • expressjs/corsͷιʔείʔυϦʔσΟϯά

    View full-size slide

  18. ϥΠϒϥϦͷηοτΞοϓ͕Θ͔Βͳ͍
    🧭 Road to h3-cors
    • ESM / CommonJSͷରԠ

    • package.jsonͷॻ͖ํ

    • READMEͷॻ͖ํ

    • unjs/templateͰҰൃղܾͰ͖ͨ

    View full-size slide

  19. ެ։ͯ͠΋࢖ΘΕͳ͍ͷͰ͸ʁ
    🧭 Road to h3-cors
    • OSSެ։ͷମݧஊهࣄΛಡΉ

    • ςετ͸ͪΌΜͱॻ͘ɺΉ͠ΖςετͰ͖ΔΑ͏ʹ࣮૷͢Δ

    • README͸ͪΌΜͱॻ͘

    • ։ൃऀମݧ͸ɺh3΍طଘͷྨࣅύοέʔδʹΑͤΔ

    • એ఻͢Δɺ͠ͳ͍ͱຒ΋ΕΔ

    View full-size slide

  20. h3-corsΛެ։ͨ݁͠Ռ

    View full-size slide

  21. h3-corsΛެ։ͨ݁͠Ռ
    🔍 Results
    • ͸͡ΊͯͷGitHubελʔ

    • Issue͸خ͍͠

    • PR͸΋ͬͱخ͍͠

    • Φʔφʔγοϓͷ͋Δ։ൃ͸ָ
    ͍͠
    • CORSͷ࣮૷·͕ͪͬͯ·ͨ͠

    • NPMμ΢ϯϩʔυͷ਺ࣈ͸৳ͼ
    ͳ͍

    • IssueτϦΞʔδͱ࣮૷ʹ͸࣌ؒ
    ͕ͱΒΕΔ

    • PRϨϏϡʔʹ΋͕࣌ؒͱΒΕΔ

    View full-size slide

  22. ·ͱΊ
    Takeaways
    • ʮείʔϓͷด͍ͯ͡Δʯύοέʔδ͕͓͢͢Ί

    • ॳظηοτΞοϓ͸unjs/template͕͓͢͢Ί

    • ਺ࣈͷ৳ͼ͸ʮ඼࣭ͦͷ΋ͷʯΑΓ΋͖͔͚͕ͬ͋Δ͔ͳ͍͔

    • ஶ໊ͳOSSͷϝϯςφʔͨͪͷେม͞ͷยྡྷΛຯΘ͑Δ

    • ϝϯςφϯε͸େม͚ͩͲɺΦʔφʔγοϓΛ΋ͯΔͷ͸ָ͍͠

    View full-size slide