一个有点黑科技的 Xcode 伙伴。也许也适合你?
Swift 编译时间非常耗时。让我们忽略所有文件,只保留我现在正在处理的文件。💡
安装并从 AppleScript 调用它,这样它也可以从 Xcode 中调用。
#!/usr/bin/osascript
use AppleScript version "2.4" # Yosemite or later
use scripting additions
use framework "Foundation"
on run
tell application "Xcode"
set projectPath to path of active workspace document
set projectFolder to characters 1 thru -((offset of "/" in (reverse of items of projectPath as string)) + 1) of projectPath as string
set sourceName1 to (get name of window 1)
try
do shell script "hackscode remove-build-files --from-target AbemaTVTests --matching UI.*Spec.swift --excluding " & sourceName1 & " --project-root " & projectFolder
display notification "👌 Ignored all specs except " & sourceName1 with title "Hackscode"
on error errStr number errorNumber
display notification "🛑 " & errStr & " (" & errorNumber & ")"
end try
end tell
end run
将脚本触发器设置为 Xcode 行为。
$ hackscode dump-build-files --targets hackscode
## hackscode
CreateNewFile.swift
DumpBuildFiles.swift
RemoveBuildFiles.swift
XQuick.swift
Utilities.swift
main.swift
zzz.Sourcery.out.swift
Mint
mint install toshi0383/hackscode
运行以下命令开始开发。
make bootstrap
在您更改命令接口后,您需要运行此命令。
make sourcery
参见: https://github.com/toshi0383/CoreCLI
MIT