Pancake with SourceKitten

Pancake with SourceKitten

・SourceKitten を使ってドキュメント自動生成
・(おまけ)Instagram へ写真をシェアするライブラリ

※パンケーキは関係ありません。

5eee847529e8f5ec2f634a85075fd5aa?s=128

Satoshi Hachiya

January 27, 2016
Tweet

Transcript

  1. Pancake with SourceKitten 2016.01.27 ؔ੢ϞόΠϧΞϓϦݚڀձ #10 Martha 1

  2. ࣗݾ঺հ @JPMartha_jp JPMartha 2

  3. MarthaʢϚʔαʣ • ֨ಆՈͷ໊લͰڹ͖͕͍͍ͱࢥͬͯ
 ࢖͍͸͡Ί·ͨ͠ɻ • ͨͩঁੑͷ໊લͩͱ͋ͱ͔Β஌Γ·ͨ͠ɻ • ͝ཡͷͱ͓ΓΦδαϯͰ͢ɻ 3

  4. ਆށ͔Βདྷ·ͨ͠ 4

  5. ൃදͷ֓ཁ • SourceKitten Λ࢖ͬͯυΩϡϝϯτࣗಈੜ੒ • ʢ͓·͚ʣInstagram ΁ࣸਅΛγΣΞ͢ΔϥΠϒϥϦ 5

  6. υΩϡϝϯτ ࣗಈੜ੒πʔϧ ·ͩ׬੒͸͍ͯ͠ͳ͍Ͱ͕͢ݱঢ়ใࠂͰ͢ɻ 6

  7. πʔϧΛάάΓ·ͨ͠ ͦ͏͍͏΋ͷ͸͢Ͱʹ͋Γ·͢ɻ 7

  8. jazzy https://github.com/realm/jazzy • HTMLܗࣜͷϑΝΠϧΛੜ੒͠·͢ɻ ‣Markdown ܗࣜʹ͍ͨ͠Ͱ͢ɻ • ΦʔϓϯιʔεͰ͢ɻʢRubyʣ ‣Ruby ͸Θ͔Γ·ͤΜɻ

    8
  9. ࣗྗͰ࡞Γ·͢ https://github.com/JPMartha/Pancake ʢԾʣ 9

  10. ίʔυղੳ • ͸͡Ί͸ࣗྗͰ͠·͕ͨ͠ෳࡶͰͨ͠ɻ • SourceKitten Λར༻͢Δ͜ͱʹ͠·ͨ͠ɻ
 ʢ jazzy ΍ SwiftLint

    ΋ར༻͍ͯ͠·͢ʣ ‣https://github.com/jpsim/SourceKitten ‣https://github.com/realm/jazzy ‣https://github.com/realm/SwiftLint 10
  11.  SourceKitten ͱ͸ ͜Μͳ͜ͱ͕Ͱ͖·͢ɻʢઆ໌͸লུʣ

  12. [{ "\/Users\/sathachie\/Pancake\/DemoApp\/DemoApp\/ViewController.swift" : { "key.substructure" : [ { "key.kind" :

    "source.lang.swift.decl.class", "key.offset" : 174, "key.parsed_declaration" : "class ViewController: NSViewController", "key.namelength" : 14, "key.bodyoffset" : 208, "key.bodylength" : 385, "key.length" : 14, "key.name" : "ViewController", "key.typename" : "ViewController.Type", "key.parsed_scope.end" : 34, "key.usr" : "s:C7DemoApp14ViewController", "key.nameoffset" : 174, "key.inheritedtypes" : [ { "key.name" : "NSViewController" } ], "key.annotated_decl" : "<Declaration>class ViewController : <Type usr=\"c:objc(cs)NSViewController\">NSViewController<\/Type><\/ Declaration>", "key.accessibility" : "source.lang.swift.accessibility.internal", "key.substructure" : [ { "key.kind" : "source.lang.swift.decl.function.method.instance", 12
  13. ߏ੒ 13 SourceKitʢίʔυղੳɾύʔεʣ HimotokiʢJSONσίʔυʣ ࣗ࡞πʔϧʢMarkdownੜ੒ʣ SourceKittenʢJSONੜ੒ʣ

  14. Markdown ܗࣜͰग़ྗ 14

  15. ݱঢ়ใࠂ Himotoki ͸ΤϥʔͰࣦഊͨ͠ͷͰ… 15

  16. Promise.swift https://github.com/yashigani/Promise 16

  17.  Promise.md

  18.  State.md Result.md

  19. ͜͜ʹஔ͍͍ͯ·͢ https://gist.github.com/JPMartha/49b3215fb5d99bdf9aea 19

  20. ͓·͚ 20

  21. Instagram ΁ࣸਅΛ γΣΞ͢ΔϥΠϒϥϦ https://github.com/JPMartha/EggsBenedict 21

  22. 

  23. ΦʔϓϯιʔεͰ͢ ͨͩ͠ Issues ͸͢΂ͯࣗ෼ͷϝϞͰ͢ɻ 23

  24. ࢀߟ • SourceKitten
 https://github.com/jpsim/SourceKitten • jazzy
 https://github.com/realm/jazzy • SwiftLint
 https://github.com/realm/SwiftLint

    • Swift SourceKitΛ࢖ͬͯSwiftιʔείʔυΛϋΠϥΠτ͢Δ
 http://qiita.com/gfx/items/7f47e98762ecf6f53af5 • SourceKittenʹ͍ͭͯ
 http://www.slideshare.net/ssusera7b1a1/source-kitten 24
  25. Ҏ্ ͋Γ͕ͱ͏͍͟͝·ͨ͠ 25