-
Notifications
You must be signed in to change notification settings - Fork 31
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 for optional attributes in script tag #1
Comments
I actually thought about it many times and the situation is ambiguous. The plugin is called "gulp-html-replace", right? The initial idea was to give users more freedom. I mean not just add attributes but to be able to change default script templates. Like, you think that "rel" attribute in css tag needs to be after "href"? Here, do that. Want to add text instead of script? Make a template. Need to remove attribute instead of adding? Make a template without it. It could be really cool and powerful on the one hand, but i'm scared it could turn your clean code into a mess. I mean the template option will be optional of course, but anyway... |
I like this plugin because it does just what I need (except more control on script tag). if you want full template with full freedom, it should be something like that: One simple solution could be to add the html replace stuff and add the ability with an option I hope this is understandable ;) |
I updated the plugin, now you can change the templates. Please refer to readme file. |
Hi,
It would be nice to have 'options' for the final script file to be able to add 'defer' or 'async' attributes.
More generic, be able to add 'attr'='value' in the script tag.
Thx
The text was updated successfully, but these errors were encountered: