Swiftpack.co - Package - q231950/commands

Commands

Commands allows you to execute commands from within your application or via the command line tool Commands

Development

Command line

You can build and run an example from the command line:

$ swift build
Compile Swift Module 'CommandsCore' (3 sources)
Compile Swift Module 'Commands' (1 sources)
Linking ./.build/x86_64-apple-macosx10.10/debug/Commands
$ ./.build/x86_64-apple-macosx10.10/debug/Commands '/usr/bin/irb'
Switch to inspect mode.

>> 
1+1
1+1

=> 2

>> 
exit
exit

Xcode

It's more fun to do it within Xcode though:

$ swift package generate-xcodeproj
generated: ./Commands.xcodeproj

Open the project add a launch argument to the Commands target's run phase.

$ open Commands.xcodeproj

Setting the launch path

The target is now configured to run an example with the Interactive Ruby Shell (IRB) to be launched. Select the Commands scheme and My Mac as target and hit the run button.

Example console output

Test

swift test


Have fun 🐼

Github

link
Stars: 2
Help us keep the lights on

Dependencies

Used By

Total: 1