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

Feature/adding all values in images enum #44

Conversation

HEYGUL
Copy link

@HEYGUL HEYGUL commented Oct 28, 2015

Add an array in the images enum so we can iterate over them.

@AliSoftware
Copy link
Collaborator

Hey, thanks for the PR !

I think that feature is very rarely useful (I never had to iterate over all the images in my Assets Catalog, and don't think most of people do), so I think that'll make the generated file quite long (like when people have 100+ images in their assets catalog)

So here's what I suggest:

  1. Keep the existing template unchanged (and revert the examples in README & Playground)
  2. Create a separate template that adds what you did so we can have this allValues entry, but as an opt-in option. People wanting to have this could simply use your template instead of the default one.
  3. I'll then include your template alongside mine when SwiftGen is installed. Once Store custom templates in ApplicationSupport #42 is merged, which would allow people to use --templateName to specify a template by name instead of by full path, this would make it easier for people to choose the default template without allValues or your template with it

AliSoftware added a commit that referenced this pull request Nov 4, 2015
AliSoftware added a commit that referenced this pull request Nov 4, 2015
AliSoftware added a commit that referenced this pull request Nov 4, 2015
@AliSoftware
Copy link
Collaborator

Merged via d430f56

@AliSoftware AliSoftware closed this Nov 4, 2015
@HEYGUL
Copy link
Author

HEYGUL commented Nov 4, 2015

Thank you very much to accept this MR :-) 👍

@AliSoftware
Copy link
Collaborator

Now that #50 is merged, you'll be able to use swiftgen images -t allvalues PATH in order to use this specific template which will be bundled with SwiftGen in the next release.

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

Successfully merging this pull request may close these issues.

2 participants