Easily import third-party dependencies in your Swift scripts ↦
Avoid migrating your Swift scripts to packages and using swift build
just to include a dependency. Change #!/usr/bin/swift
to #!/usr/bin/swift sh
and you’re good to go:
#!/usr/bin/swift sh
import PromiseKit // @mxcl ~> 6.5
firstly {
after(.seconds(2))
}.done {
print("Scripts with package dependencies!")
exit(0)
}
RunLoop.main.run()
Discussion
Sign in or Join to comment or subscribe