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

Multibrand example still uses templates rather than formats #226

Closed
custa1200 opened this issue Jan 8, 2019 · 6 comments
Closed

Multibrand example still uses templates rather than formats #226

custa1200 opened this issue Jan 8, 2019 · 6 comments

Comments

@custa1200
Copy link

In the build.js file the android and iOS groups still use the old template formats. It also uses a mix of quotation marks as can be seen in the build path.

     "android": {
        "transformGroup": "android",
        "buildPath": `build/android/${brand}/`,
        "files": [{
          "destination": "tokens.colors.xml",
          "template": "android/colors"
        },{
          "destination": "tokens.dimens.xml",
          "template": "android/dimens"
        },{
          "destination": "tokens.font_dimens.xml",
          "template": "android/fontDimens"
        }]
      },
      "ios": {
        "transformGroup": "ios",
        "buildPath": `build/ios/${brand}/`,
        "files": [{
          "destination": "tokens.h",
          "template": "ios/macros"
        }]
      }

@custa1200
Copy link
Author

Sorry I saw why you have used that style of quotation marks there, the script breaks if using traditional quotes. Ignore the second bit of my issue :)

@didoo
Copy link
Contributor

didoo commented Jan 8, 2019

@custa1200 I'll have a look at the example (I've done it, I don't remember if there were good reasons to still use templates in this case). Regarding the quotes, they are template literals, they are intended :)

@custa1200
Copy link
Author

Regarding the quotes, they are template literals, they are intended :)

Well thats my thing learnt for the day :)

@didoo
Copy link
Contributor

didoo commented Jan 19, 2019

@custa1200 I have checked, and the example with the multi-brand example is correct, the "template" is still a valid declaration in the config (these are the standard templates). what is deprecated is the "registerTemplate" method, which actually was still used in another example, so I have updated that one in #232.

Thank you for raising the issue.

@dbanksdesign
Copy link
Member

To add a bit more context, when we began the deprecation path of templates, we copied all built-in templates to formats of the same name. Until we full remove templates/registerTemplate from the codebase you should be able to call them either as formats or templates. If you call it as a template it will show a warning message and how to migrate though!

@chazzmoney
Copy link
Collaborator

Fixed in v2.7.0

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

4 participants