I've been playing around with using Swift as a scripting language, as described here. When executing script files from the terminal in this way, is there a way to include other Swift files by path (i.e.
import only works with modules. If you need to import a module which is located somewhere besides the normal import search path, you can add another directory to the search paths by passing the
-I flag to the compiler:
-I <value>Add directory to the import search path
If you're looking at just a .swift file, you'll need to compile that into a module before you can import it from a separate module or the REPL.