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

開発合宿@京都 /hack-camp-kyoto

kentana20
August 13, 2016

開発合宿@京都 /hack-camp-kyoto

京都で開催した開発合宿の成果発表資料です

kentana20

August 13, 2016
Tweet

More Decks by kentana20

Other Decks in Programming

Transcript

  1. ։ൃ߹॓੒Ռൃද
    ݹయ෦ ݉ ͔Δͨ෦
    @kentana20

    View full-size slide

  2. Agenda
    • ߹॓Ͱͷ໨ඪ
    • ΍ͬͨ͜ͱ
    • σϞ
    • ·ͱΊ

    View full-size slide

  3. ߹॓Ͱͷ໨ඪ
    • ࣗࣾϖʔδΛMiddlemanԽͯ͠Ϟμϯʹ
    • ژ౎Λָ͠Ή
    • ͪ͸΍;ΔΛ؍Δ
    • ੟஍ʹߦ͘

    View full-size slide

  4. Middleman
    • Ruby੡ͷ੩తαΠτδΣωϨʔλ
    • ςϯϓϨʔτΤϯδϯ
    • ։ൃ༻αʔόʹ΋ͳΔ
    • ෦෼ςϯϓϨʔτ΋࢖͑Δ
    • ྨࣅ: Jekyll, HUGO

    View full-size slide

  5. ࣗࣾϖʔδ

    View full-size slide

  6. എܠ
    • ࣗࣾϖʔδ( http://www.ikyu.co.jp )ͷӡ༻͸

    ੜͷHTMLΛ࡞ͬͯमਖ਼͍ͯͨ͠
    • ϖʔδͷߋ৽͸FTPͰπϥ͍
    • ྨࣅϖʔδ΋ίϐϖͰ৑௕

    View full-size slide

  7. എܠ2
    • ͱ͋Δ೔ͷձ࿩
    • @naoya ʮ࠾༻ϖʔδͬͯͲ͏΍ͬͯϝϯςͯ͠Δͷʁʯ
    • @kentana20 ʮFTPͰμ΢ϯϩʔυͯ͠मਖ਼ͯ͠ΞοϓͰ͢Ͷʯ
    • @naoya ʮͦΕ͸πϥ͍ɻ΋͏ͪΐͬͱϚγʹ͍ͨ͠Ͷʯ
    • @kentana20 ʮͰ͢Ͷʯ
    • @naoya ʮMiddlemanͱ͔࢖͓͏Αʯ
    • @kentana20 ʮ;Ή;Ήʯ

    View full-size slide

  8. ελʔτ஍఺
    • Middleman৮ͬͨ͜ͱͳ͍
    • Rails͸ܦݧ͋Δ
    • ࣗࣾϖʔδͷFTPΞΧ΢ϯτ࣋ͬͯΔ

    View full-size slide

  9. ಋೖͱॳظԽ
    $ gem install middleman
    $ middleman init ikyucorp

    View full-size slide

  10. Ϗϧυ
    $ middleman build

    View full-size slide

  11. αʔόىಈ
    $ middleman server

    View full-size slide

  12. σΟϨΫτϦߏ੒
    ੜ੒͞ΕΔ
    ੩తϑΝΠϧ͸build഑Լʹ
    Ϗϧυલͷerb, sassϑΝ
    ΠϧͳͲ͸source഑Լʹ

    View full-size slide

  13. ศརͳ఺#1
    • ෦෼ςϯϓϨʔτ
    • ϔομɺϑολͳͲڞ௨෦෼Λ෦඼Խ
    • ෦෼ςϯϓϨʔτ΁ͷม਺౉͠(locals)΋Մೳ
    <%= partial 'partials/nav_top' %>

    <%= partial 'partials/head_top' %>

    View full-size slide

  14. ศརͳ఺#2
    • LiveReload
    • ϑΝΠϧΛॻ͖׵͑ͨλΠϛϯάͰϒϥ΢βΛউखʹ
    Ϧϩʔυͯ͘͠ΕΔ
    $ middleman server --livereload

    View full-size slide

  15. ࣗࣾϖʔδMiddlemanԽ
    • ର৅ϖʔδ͸ http://www.ikyu.co.jp/recruit/
    • ϨΠΞ΢τɺ෦෼ςϯϓϨʔτͳͲͰڞ௨Խͭͭ͠
    MiddlemanԽ
    • ΍Γ࢝Ί͔ͯΒ1೔͘Β͍ͰͰ͖ͨ

    View full-size slide

  16. HerokuʹσϓϩΠ
    • αΠτ࡞Δ
    • Procfile
    • MiddlemanͷϏϧυͱىಈΛॻ͚ͩ͘
    web: bundle exec middleman build && middleman server -p $PORT

    View full-size slide

  17. Circle CIͰࣗಈԽ
    • Heroku΁ͷσϓϩΠΛࣗಈԽ
    • master mergeͰൃಈ
    machine:
    timezone:
    Asia/Tokyo
    ruby:
    version: 2.3.1
    test:
    override:
    - echo "test"
    deployment:
    production:
    branch: master
    heroku:
    appname: ikyucorp-middleman
    testͷهड़͸ඍົ…
    ͚Ͳ੩తαΠτͳͷͰ…

    View full-size slide

  18. ࢒Γ΍Δ͜ͱ
    • HerokuͰ΍Δͷ͔ / ͘͞Βͷ··͔ΛܾΊΔ
    • HerokuͳΒͦͷ··ɺ͘͞ΒͳΒσϓϩΠํࣜΛม͑Δ
    • middleman-deploy ͱ͍͏Gem͕FTPͰͷϦϦʔεʹ

    ରԠ͍ͯ͠Δ
    • HerokuͳΒ /recruit/ ഑Լ΁ͷΞΫηεΛϦμΠϨΫτ͞
    ͤΔ

    View full-size slide

  19. Middlemanॴײ
    • Middleman
    • Rails͔Β੩తαΠτ࡞Δػೳ͕ൈ͖ग़͞ΕͯΔײ͡Ͱ࢖
    ͍উख͕͍͍
    • ϏϧυɺσϓϩΠ΋ϥΫ
    • ͜ΕͳΒσβΠφʔʹ΋࢖ͬͯ΋Β͑Δͱࢥ͏
    • ૣ͘΍Ε͹Α͔ͬͨɻɻ

    View full-size slide

  20. ߹॓ॴײ
    • ߹ָ͍॓͠
    • ·ͱ·ͬͨ࣌ؒͰ੒Ռग़͠΍͍͢
    • ࠓճਓ਺૿͑ͯخ͍͠(6໊ -> 9໊)
    • ژ౎Ͱ͸༠࿭͕ଟ͗ͯ͢੨य़શ෦͔͚Δͷ͕Ή͔͍ͣ͠
    • ·ͨ΍Γ·͠ΐ͏

    View full-size slide

  21. ژ౎Λָ͠Ή

    View full-size slide

  22. ͪ͸΍;ΔΛ؍Δ

    View full-size slide

  23. ͋ͱ͸੟஍΁

    View full-size slide