JohnSundell / ShellOut

Easily run shell commands from a Swift script or command line tool
MIT License
872 stars 85 forks source link

Question #13

Closed MasterSwift closed 6 years ago

MasterSwift commented 6 years ago

How do import ShellOut or even any module within a single executable file in a workspace folder? Current methods require you building the whole project but I just want to run one swift file from command line thats within a folder of my workspace Source folder. When I try "swift myFile.swift" from command line in the directory I get the error

error: no such module 'ShellOut'

Any help here would be nice. Thanks!

JohnSundell commented 6 years ago

Hi @MasterSwift 👋 I'd recommend using Marathon - which solves this exact problem - it lets you use packages and other dependencies in your Swift scripts! 👍 Check it out here: https://github.com/johnsundell/marathon.