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 directories as folder references #25

Closed
ImLaufderZeit opened this issue Aug 22, 2017 · 4 comments
Closed

Add directories as folder references #25

ImLaufderZeit opened this issue Aug 22, 2017 · 4 comments
Assignees

Comments

@ImLaufderZeit
Copy link

Adding specific directories as Folder References would be really nice feature.
I'm referring to the thing below:
folderreference

@pepicrft
Copy link

That's a good one @ImLaufderZeit 😛

@yonaskolb
Copy link
Owner

yonaskolb commented Aug 22, 2017

Yeah, that's a good feature. Given that the groups are synced to disk anyway though, I thought it would be less important, because as far as I know the only downside to using groups as opposed to folder references is that you have to manually manage them, but that isn't an issue with XcodeGen. Would specific problem would this solve for you?

I could imaging it maybe looking like this:

targets:
    - name: MyTarget
    - sources:
        - path: MyTarget
          name: MyTarget
          type: group
        - path: ../MyDirectory
          type: folderReference

This would add an optional name property (that defaults to the directory name), and an optional type (which would default to group). Sources could still be written as an array of strings that use the defaults, or you could specific this more verbose form with more flexibility. And a single source string would still be allow as it is now for simple cases (sources: MyTarget)

Using the more verbose form would mean you could potentially define an excludes: */*.uglyFiles for group types as well

What do you think?

@ImLaufderZeit
Copy link
Author

ImLaufderZeit commented Aug 23, 2017

@yonaskolb, that sounds just awesome.

... Given that the groups are synced to disk anyway though, ..... Would specific problem would this solve for you?

Well, in fact, if #24 has been solved - there is no problem, exactly as you say. But still it's good to have it as an option, because you can manage assets including directory structure which means you can use multiple same name files if parent directory is different.

with folder references you can do below:

Assets/Home/background.png
Assets/SingIn/background.png

while with groups you cannot, since those have identical filenames.

And plus, with folder references you do not have to re-generate a project every time you add a file.

@yonaskolb
Copy link
Owner

Resolves in #151

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

No branches or pull requests

3 participants