Beak icon indicating copy to clipboard operation
Beak copied to clipboard

Add a way of including local dependencies

Open visav opened this issue 7 years ago • 2 comments

I'm experimenting with beak to automate some tasks and it's been a great experience so far. Thank you for creating this great tool! It's well documented and delivers what it promises.

Currently beak supports dependencies with // beak: {repo} {library} {library} ... @ {version} syntax. I'm wondering if this syntax / dependency handling could be enhanced to enable local package dependencies.

To me it feels like a single beak.swift file can become bloated if one wants to utilise this great tool for many tasks. In order to split some project specific solutions for different problems, I would love the ability for beak to include from a local package. This could follow SPM dependency format for local dependencies. E.g.:

// beak.swift

// - github
// beak: kareman/SwiftShell @ 4.0.0
// - local
// beak: ../MyTasks

import SwiftShell
import MyTasks

I don't know if this aligns with the philosophy of beak, but I think this could be very useful.

visav avatar Jan 19 '18 22:01 visav

Thanks for the kind words @visav Yeah, that should be possible. It could either be a local package or simply a directory with loose files in it (or even another single swift file). If you'd like to submit a PR that would be great! 😄

yonaskolb avatar Jan 20 '18 10:01 yonaskolb

I just made a similar suggestion to this in #40 and would vulonteer to implement it. Does it look good to you guys? If yes, I will try to implement it in the coming weeks.

I created a new issue since it's not exactly the same idea as here the title suggests I would need to create local packages in order to split the beak.swift files into several files. For me that's too much overhead ...

Jeehut avatar Oct 25 '18 10:10 Jeehut