You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is an oversight or an enhancement request.
Each time I run my gulp project it compiles my html files and puts it in the template cache for me. This works great! However, depending on the machine your template cache either has line endings as \r\n or \n. \r\n occurs on windows machines and \n occurs in linux/Mac machines. My template.js file is in version control so often the template.js file is checked in again even though there are no changes (besides line endings). Is there a way to normalize this so I only get line endings?
Proposed solution
Add a lineEndings setting, letting the user specify what it should always be. Maybe something like:
Generally, before piping your HTML to this plugin you should minify it using a HTML minifying gulp plugin. We do not touch your HTML, other than converting it to a JavaScript string. It's in line with the gulp plugin philosophy that a plugin should do one thing and one thing only (which is why we do not minify the HTML for you).
So if you use some template engine, the problem is there. Otherwise try looking into a HTML minifying plugin.
Problem
I'm not sure if this is an oversight or an enhancement request.
Each time I run my gulp project it compiles my html files and puts it in the template cache for me. This works great! However, depending on the machine your template cache either has line endings as
\r\n
or\n
.\r\n
occurs on windows machines and\n
occurs in linux/Mac machines. My template.js file is in version control so often the template.js file is checked in again even though there are no changes (besides line endings). Is there a way to normalize this so I only get line endings?Proposed solution
Add a lineEndings setting, letting the user specify what it should always be. Maybe something like:
Example
Example *.html files:
Result on a windows machine:
Result on Mac/Linux
The text was updated successfully, but these errors were encountered: