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

Helpers cleanup #18

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

fromthecove
Copy link
Contributor

I ran into an issue where I incorrectly assumed the order of parameters between assetCss and the other asset helpers would be similar, but they weren't, so I moved the $rel argument to the end of the argument list so that $name and $version would be the first two arguments on all of the asset helpers. I recognize this would constitute a backwards-compatibility issue for those using Potion 1.x.

I also needed the ability to set the defer attribute on certain JS assets, so I added that optional argument to the assetJs helper.

The assetUrl method was not including a ? before the cache-busting v URL parameter, so I added that.

Lastly, and I know this is a style preference, I think the generated asset HTML tags would almost always be wanted on their own line, so I added a newline character to the HTML returned from each asset helper.

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