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

Use template name relatively into template #462

Closed
Alex293 opened this issue Dec 25, 2018 · 3 comments
Closed

Use template name relatively into template #462

Alex293 opened this issue Dec 25, 2018 · 3 comments

Comments

@Alex293
Copy link

Alex293 commented Dec 25, 2018

I have like 10 framework representing features which have this folder structure :
Features/FeatureX/Sources
Features/FeatureX/Tests
Features/FeatureX/SupportingFiles/info.plist
Features/FeatureX/SupportingFiles/testsinfo.plist

I'd like to define a template able to generate the framework target and it's test target. Right now I'm overriding the paths when I import the target. Is there a way to use the target name as a var inside the template so It pickup the right paths without explicitly typing them ?

@yonaskolb
Copy link
Owner

At the moment this isn't possible. Perhaps it's worth adding a $targetName replacement to targetTemplates much like multi platform targets have a $platform replacement string

targets:
  Feature1:
    templates: [Feature]
targetTemplates:
  Feature:
    platform: iOS
    type: framework
    sources:
      - Features/$target_name/Sources
      - Features/$target_name/Tests
      - Features/$target_name/SupportingFiles/info.plist
      - Features/$target_name/SupportingFiles/testsinfo.plist

@AlexisQapa
Copy link

That would be very convenient indeed !

@yonaskolb
Copy link
Owner

Implemented in #504

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