Difference between revisions of "Script Snippet: Swift Packages"

From Coder Merlin
Line 1: Line 1:
== Create a new Swift Package for an Executable ==
== Create a new Swift Package for an Executable ==
<syntaxhighlight lang="bash">
swift package init --type executable
</syntaxhighlight>


<syntaxhighlight lang="swift" highlight="12">
== Remove the build artifacts of a Swift Package ==
swift package init --type executable
<syntaxhighlight lang="bash">
swift package reset
</syntaxhighlight>
 
== Build a Swift Package in default debug mode ==
<syntaxhighlight lang="bash">
swift build
</syntaxhighlight>
 
== Build a Swift Package for debugging in lldb ==
<syntaxhighlight lang="bash">
swift build -Xswiftc -g
</syntaxhighlight>
 
== Build a Swift Package in release mode ==
<syntaxhighlight lang="bash">
swift build
</syntaxhighlight>
</syntaxhighlight>

Revision as of 21:03, 29 May 2019

Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

Create a new Swift Package for an Executable[edit]

swift package init --type executable

Remove the build artifacts of a Swift Package[edit]

swift package reset

Build a Swift Package in default debug mode[edit]

swift build

Build a Swift Package for debugging in lldb[edit]

swift build -Xswiftc -g

Build a Swift Package in release mode[edit]

swift build