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

プロフィールページ(ポートフォリオサイト)を
 Swift-DocC で作れるか? / Can we create a profile page (portfolio site) in Swift-DocC?

プロフィールページ(ポートフォリオサイト)を
 Swift-DocC で作れるか? / Can we create a profile page (portfolio site) in Swift-DocC?

プロフィールページ(ポートフォリオサイト)を
 Swift-DocC で作れるか?
@treastrain

NEW DEBUG!!!! v4.0-fix52 World Wintu Daifugou Conference @ CASPUR 2022/06/17 22:00~

More Decks by treastrain / Tanaka Ryoga

Other Decks in Technology

Transcript

  1. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. /&8%&#6(W

    fi Y8PSME8JOUV%BJGVHPV$POGFSFODF!$"4163+VOF  ϓϩϑΟʔϧϖʔδʢϙʔτϑΥϦΦαΠτʣΛ 
 4XJGU%PD$Ͱ࡞ΕΔ͔ʁ !USFBTUSBJO 1
  2. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 2

    /// Eat the provided specialty sloth food. /// /// Sloths love to eat while they move very slowly through their rainforest habitats. They /// are especially happy to consume leaves and twigs, which they digest over long periods /// of time, mostly while they sleep. /// /// When they eat food, a sloth's ``energyLevel`` increases by the food's /// ``Food/energy``. mutating public func eat(_ food: Food, quantity: Int = 1) -> Int { energyLevel += food.energy * quantity return energyLevel } 4PVSDF"QQMF
  3. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 3

    Swift-DocC 4PVSDF"QQMF
  4. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 4XJGU%PD$Ͱग़ྗͰ͖Δ΋ͷ

    w ιʔείʔυ಺γϯϘϧυΩϡϝϯτʢ"1*ϦϑΝϨϯεʣ 
 ʢ*OTPVSDFTZNCPMEPDVNFOUBUJPOʣ w ٕज़هࣄ 
 ʢ5FDIOJDBMBSUJDMFTʣ w ϦονͰॆ࣮ͨ͠νϡʔτϦΞϧ 
 ʢ3JDIUVUPSJBMTʣ 4
  5. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 5

    /// Eat the provided specialty sloth food. /// /// Sloths love to eat while they move very slowly through their rainforest habitats. They /// are especially happy to consume leaves and twigs, which they digest over long periods /// of time, mostly while they sleep. /// /// When they eat food, a sloth's ``energyLevel`` increases by the food's /// ``Food/energy``. mutating public func eat(_ food: Food, quantity: Int = 1) -> Int { energyLevel += food.energy * quantity return energyLevel } 4PVSDF"QQMF
  6. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 6

    # Getting Started with Sloths Create a sloth and assign personality traits and abilities. ## Overview Sloths are complex creatures that require careful creation and a suitable habitat. 4PVSDF"QQMF
  7. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 7

    IUUQTEFWFMPQFSBQQMFDPNUVUPSJBMTTXJGUVJDSFBUJOHBOEDPNCJOJOHWJFXT
  8. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 4XJGU%PD$Ͱग़ྗͰ͖Δ΋ͷ

    w ιʔείʔυ಺γϯϘϧυΩϡϝϯτʢ"1*ϦϑΝϨϯεʣ 
 ʢ*OTPVSDFTZNCPMEPDVNFOUBUJPOʣ w ٕज़هࣄ 
 ʢ5FDIOJDBMBSUJDMFTʣ w ϦονͰॆ࣮ͨ͠νϡʔτϦΞϧ 
 ʢ3JDIUVUPSJBMTʣ 8
  9. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 9

  10. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 4XJGU%PD$ͰϓϩϑΟʔϧϖʔδΛ࡞Δ

     4XJGU1BDLBHFΛ࡞Δ  .BSLEPXOͰϖʔδΛ࡞Δ  ϓϨϏϡʔ͢Δ  ग़ྗ͢Δ 10
  11. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 4XJGU1BDLBHFΛ࡞Δ

    w 4XJGU%PD$͸ɺ4XJGU1BDLBHFɺ'SBNFXPSLɺ"QQͷ͍ͣΕ͔͕ඞཁ w த਎͕ۭͬΆͷ4XJGU1BDLBHFΛ࡞Δ 11 % swift package init
  12. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 12

  13. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 13

  14. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 14

  15. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 15

  16. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 16

  17. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. .BSLEPXOͰϖʔδΛ࡞Δ

    w 9DPEFͷ৔߹ w ʮ'JMFʯʮ/FXʯʮ'JMFʜɹ㵰/ʯ͔Βʮ%PDVNFOUBUJPO$BUBMPHʯ w 9DPEFҎ֎ͷ৔߹ w ʮEPDDʯͰऴΘΔσΟϨΫτϦΛ࡞Δ w ʮEPDDʯͰऴΘΔσΟϨΫτϦͷதʹ.BSLEPXOϑΝΠϧΛ࡞Δ 17
  18. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 18

  19. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 19

  20. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 20

  21. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 21

  22. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ϓϨϏϡʔ͢Δ

    w 9DPEFͷ%PDVNFOUBUJPOʹग़ྗ͢Δ৔߹ w ʮ1SPEVDUʯʮ#VJME%PDVNFOUBUJPOɹ?‐㵰%ʯ w 8FCαΠτ޲͚ʹग़ྗ͢Δ৔߹ͳͲ w 4XJGUͷ4XJGU1BDLBHF.BOBHFS$PNNBOE1MVHJOTػೳΛ 
 ׆༻ͨ͠ɺ4XJGU%PD$1MVHJOΛ࢖͏ 22
  23. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 23

    Swift-DocC Plugin github.com/apple/swift-docc-plugin 📦
  24. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 24

  25. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 25

    % swift package --disable-sandbox preview-documentation --target <target-name>
  26. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 26

    % swift package --disable-sandbox preview-documentation --target <target-name> Building for debugging... Build complete! Input: /path/to/<dir-name>/Sources/<target-name>/<docc-name>.docc Template: /Applications/Xcode.app/Contents/Developer/Toolchains/ XcodeDefault.xctoolchain/usr/share/docc/render ======================================== Starting Local Preview Server Address: http://localhost:8000/documentation/<target-name> ======================================== Monitoring /path/to/<dir-name>/Sources/<target-name>/<docc-name>.docc for changes…
  27. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 27

  28. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 28

  29. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ϥϯσΟϯάϖʔδΛฤू͢Δ

    ख௚͠ w ϥϯσΟϯάϖʔδͱ͍ͨ͠.BSLEPXOϑΝΠϧͷϖʔδλΠτϧʹ͸ɺ 
 Ϟδϡʔϧ໊ΛೋॏόοΫΫΥʔτͰғΈɺγϯϘϧϦϯΫΛೖྗ͢Δ w γϯϘϧϦϯΫ͸ίʔυิ׬͞ΕΔ 29
  30. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 30

  31. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 31

  32. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. <43><4XJGU%PD$>

    
 4VQQPSUDVTUPNEPDVNFOUBUJPONPEVMFLJOET 32
  33. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ϞδϡʔϧछผදࣔͷΧελϚΠζ

    w ίϚϯυϥΠϯҾ਺ʹΑΔࢦఆ w --fallback-default-module-kind <name> w *OGPQMJTUʹΑΔࢦఆ w CDDefaultModuleKind 33
  34. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. *OGPQMJTUͰCDDefaultModuleKindΛࢦఆ

    w *OGPQMJTUΛEPDDσΟϨΫτϦԼʹ࡞੒ 34
  35. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. *OGPQMJTUͰCDDefaultModuleKindΛࢦఆ

    w ,FZʹCDDefaultModuleKindɺ7BMVFʹ෇໊͚͍ͨલΛࢦఆ 35
  36. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 36

  37. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. 37

  38. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ·ͱΊ

    ఻͔͑ͨͬͨ͜ͱ w 4XJGU%PD$ͰϓϩϑΟʔϧϖʔδ͘Β͍͸࡞ΕΔ w 9DPEFͰ΋ɺͦ͏͡Όͳ͚Ε͹4XJGU͕ಈ͘؀ڥͳΒ࡞ΕΔ w "QQMFͷυΩϡϝϯτͬΆ͍γϯϓϧͳσβΠϯʹͳΔ w 8FCͷμʔΫςʔϚʹࣗಈͰରԠͰ͖Δ w ϒϥ΢βͰͷϓϨϏϡʔ΋؆୯ 38
  39. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. ·ͱΊ

    ఻͑ΒΕͳ͔ͬͨ͜ͱ w ੩తͳ8FCαΠτͱͯ͠ϗεςΟϯά͢ΔͨΊͷॻ͖ग़͠ํ๏ w ग़ྗ͞ΕΔ8FCαΠτͷσβΠϯ͸4XJGUͷόʔδϣϯʹґଘ͢Δ w 4XJGUͷόʔδϣϯʹґଘͯ͠΄͘͠ͳ͚Ε͹ɺ 
 (JU)VCͷBQQMFTXJGUEPDDΛ͖࣋ͬͯͯϏϧυˠ࣮ߦ͢Ε͹Αͦ͞͏ w ͍Ζ͍ΖΧελϚΠζͰ͖ΔՕॴ͕ଞʹ΋͋ΔʢͨͿΜʣ 39
  40. Copyright © 2022 treastrain / Tanaka RyogaɹAll rights reserved. /&8%&#6(W

    fi Y8PSME8JOUV%BJGVHPV$POGFSFODF!$"4163+VOF  ϓϩϑΟʔϧϖʔδʢϙʔτϑΥϦΦαΠτʣΛ 
 4XJGU%PD$Ͱ࡞ΕΔ͔ʁɹ‎ɹ࡞Εͦ͏ʂ !USFBTUSBJO 40 ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂɹɹɹɹɹɹɹɹɹIUUQTUSFUKQɹ⏩