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

Allow config of templating util settings from app directly #1775

Closed
philipbushnell-valtech opened this issue Apr 18, 2024 · 4 comments
Closed
Labels

Comments

@philipbushnell-valtech
Copy link

philipbushnell-valtech commented Apr 18, 2024

What is the improvement or update you wish to see?

In sitecore-jss-dev-tools/src/templating/utils.ts there are settings for finer control over how items are retrieved yet these settings are not configurable beyond their internal usages (e.g. in sitecore-jss-dev-tools/src/templating/components.ts). It would be massively helpful if these could be configured from the application directly (e.g. via generateComponentBuilder).

Is there any context that might help us understand?

In our app, we have additional co-located files alongside our components (e.g. for testing) but without being able to change the fileFormat setting, it fails our build due to it outputting irrelevant files in the generated componentBuilder file (and things such as test globals like describe are not being explicitly imported so fail).

I've had to patch-package a regex setting change to work around this issue but it would be much better to just configure the settings directly in the app (i.e. in scripts/generate-component-builder/plugins/component-builder.ts) but I can't.

Does the docs page already exist? Please link to it.

No response

@addy-pathania
Copy link
Contributor

@philipbushnell-valtech would you like us to provide appropriate documentation for this?

@philipbushnell-valtech
Copy link
Author

philipbushnell-valtech commented Apr 24, 2024

@sc-addypathania possibly I've raised the wrong thing here - this is a tech improvement. I must have only read the "Update or Improvement" bit of "Docs Request for an Update or Improvement" and assumed that was what I needed to press. I can see the label doesn't really match the request; do I need to raise a new issue or can this be re-labelled as the correct thing?

@philipbushnell-valtech
Copy link
Author

philipbushnell-valtech commented Apr 24, 2024

@sc-addypathania actually I can see that it needs to be a discussion - I'll close and move it over to there. 🙂

@philipbushnell-valtech
Copy link
Author

philipbushnell-valtech commented Apr 24, 2024

See #1782

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

No branches or pull requests

2 participants