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

[enhancement/feature] registerPartials [async/sync] and renaming files to underscore. #164

Closed
iwaduarte opened this issue Apr 16, 2019 · 1 comment

Comments

@iwaduarte
Copy link

iwaduarte commented Apr 16, 2019

In relation to registerPartials being async #68, #159, #123.
Wouldn't you think it should be sync ? Considering we move our structure application towards partials and sub-partials and also because it is only executed once. I believe in most cases does not add any significant overhead to the efficiency of the platform overall.

The walkSync is a good approach as suggested.

In relation to renaming the partials.
I have partials named [partial - specific.hbs] and gets renamed to [partial _ specific] when registering. This is kind of annoying (hífen to underscore) since if we want to use the uri paths (/user-add) directly we would face this challenge of having to rename it every time in the application instead of locate the partial right away.

@dougwilson
Copy link
Contributor

Hi, I am here to help out with the maintenance of this module and working through the issues and PRs. I agree on both points of your issues. The first part I just pushed a fix for on master to release soon. To your second point, I agree that it is too opinionated. I will add an option to the registration in order to specify how to translate filenames to partial names (and thus even disable it as well), which should address your use-case.

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

2 participants