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 support for multiple viewPath #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

DSorlov
Copy link

@DSorlov DSorlov commented Oct 14, 2024

With this addition the viewPath will accept an array of strings instead of just a single string.

  • Behaves as expected using strings, no change in behaviour for traditional use
  • If an array is sent it will loop the array and use first file found as the template
  • If using array and no file is found a normal error is served just as before

The generator now supports multiple view directories instead of just one. This is much like handlebars in express normally works. It will also throw and error that is using same params as a normal file not found if no file is found for either template or text template which is how it would act before this change. Very transparent.
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

Successfully merging this pull request may close these issues.

1 participant