Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Useful Command Line Tools in Swift 3
Search
giginet
PRO
October 26, 2016
Programming
7.9k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Useful Command Line Tools in Swift 3
potatotips #34
giginet
PRO
October 26, 2016
More Decks by giginet
See All by giginet
🀄️ on swiftc
giginet
PRO
0
560
15年メンテしてきたdotfilesから開発トレンドを振り返る 2011 - 2026
giginet
PRO
2
430
Claude Codeログ基盤の構築
giginet
PRO
7
4.5k
Inside of Swift Export
giginet
PRO
1
3.3k
Swiftビルド弾丸ツアー - Swift Buildが作る新しいエコシステム
giginet
PRO
0
2.9k
SwiftでMCPサーバーを作ろう!
giginet
PRO
3
470
Creating Intuitive Developer Tool in Swift
giginet
PRO
0
1.6k
Mergeable Libraryで 高速なアプリ起動を実現しよう!
giginet
PRO
2
8.4k
5分でわかるExplicitly Built Modules
giginet
PRO
2
1.9k
Other Decks in Programming
See All in Programming
メールのエイリアス機能を履き違えない
isshinfunada
0
250
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
170
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
350
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
380
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
400
承認済みなのに差戻しできてしまうバグ、型で潰せます
shinchit
0
110
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
510
30年振りにコンパイラの定数整数除算を改善した
herumi
9
4.2k
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
350
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
280
React本体のコードリーディング
high_g_engineer
1
150
Hono + Inertia + React で LP を構築した話
oukayuka
2
150
Featured
See All Featured
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
800
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.2k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
300
A Tale of Four Properties
chriscoyier
163
24k
The Limits of Empathy - UXLibs8
cassininazir
1
610
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.1k
Optimizing for Happiness
mojombo
378
71k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
500
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
490
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
210
Transcript
Useful Command Line Tools in Swift 3 potatotips #34 @giginet
@giginet • iOS Engineer @ Cookpad • ։ൃج൫ͬͯ·͢ • झຯɿήʔϜ։ൃ
None
None
None
None
None
giginet/Toybox
$ toybox create Snippet $ toybox create $ toybox create
—-platform macos $ toybox open Snippet $ toybox list https://github.com/giginet/Toybox
None
CLI with Swift 3
Architecture • Carthage/Commandant toybox ToyboxKit.framework
Carthage/Commandant struct ListOptions: OptionsProtocol { typealias ClientError = ToyboxError let
platform: Platform? static func create(_ platform: Platform?) -> ListOptions { return self.init(platform: platform) } static func evaluate(_ m: CommandMode) -> Result<ListOptions, CommandantError<ToyboxError>> { return create <*> m <| Option<Platform?>(key: "platform", defaultValue: nil, usage: "Platform to list (ios/mac/tvos)") } } struct ListCommand: CommandProtocol { typealias Options = ListOptions typealias ClientError = ToyboxError let verb = "list" let function = "List the Playground" func run(_ options: Options) -> Result<(), ToyboxError> { // Do Something return .success() } }
Distribution
Distribution • HomebrewͰ͢Δ • Makefile • Homebrew Formula • Bottle
Makefile • CarthageͷౕΛύΫΔ $ make prefix_install PREFIX=`brew —-prefix`
class Toybox < Formula desc "Xcode Playground management made easy"
homepage "https://github.com/giginet/Toybox" url "https://github.com/giginet/Toybox.git", :tag => "0.1.0", :revision => "e65059061cd33bdbc01fe9883e6e4d2c863979f4", :shallow => false head "https://github.com/giginet/Toybox.git", :shallow => false depends_on :xcode => ["8.0", :build] depends_on 'carthage' => :build def install system "make", "prefix_install", "PREFIX=#{prefix}" bash_completion.install "Sources/Scripts/toybox-bash- completion" => "toybox" zsh_completion.install "Sources/Scripts/toybox-zsh-completion" => "_toybox" end test do system bin/"toybox" end end
Homebrew Bottle $ brew install giginet/toybox/toybox —- build-bottle $ brew
bottle toybox
None
ײ • Swift 3ॻ͖͍͢ • Commandantศར • ͭΒ͍
brew install giginet/ toybox/toybox
͝ਗ਼ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠