Swiftpack.co -  q231950/commands as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
q231950/commands
Execute commands from within your application or command line tool
.package(url: "https://github.com/q231950/commands.git", from: "0.1.3")

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
Last commit: 2 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

1 year ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API