Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for including other Swift files #40

Open
Jeehut opened this issue Oct 25, 2018 · 0 comments
Open

Add support for including other Swift files #40

Jeehut opened this issue Oct 25, 2018 · 0 comments

Comments

@Jeehut
Copy link

Jeehut commented Oct 25, 2018

Some of my beak.swift files became quite long recently and I fell like I'd rather split them into separate files with separate contexts. I'm not sure if this is possible at the moment somehow, but I couldn't find something. What I'm thinking of is something like this:

// include: beakScripts/DependencyManagement.swift
// include: beakScripts/ProjectInitializer.swift
// include: beakScripts/Utility.swift

This way one could keep the beak.swift file small and only import dependencies that are needed in the smaller files. Internally, Beak could simply replace the above entries with the files contents and build the result only reordering the dependency declarations to the top (if needed, I'm not sure if they can be declared somewhere down the line). So this should not be too hard to implement.

Alternatively the following could also be possible to include all Swift files in a directory:

// include: beakScripts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant