Closed NishantDesai1306 closed 7 years ago
I found the issue
at line# 161 var indentation = splitedFile[0].substr( splitedFile[0].lastIndexOf(EOL) + 1).match(/^\s*/)[0];
That '1' you're adding is for skipping EOL but in Windows machine the EOL is '\r\n'
which has length of 2 so the your code only skips '\r'
part (because of hardcoded 1) and hence the indentation
starts with '\n'
which was causing an extra empty new line before every <script ... ></script>
'\r\n'
Updated line #161: var indentation = splitedFile[0].substr( splitedFile[0].lastIndexOf(EOL) + EOL.length).match(/^\s*/)[0];
I am using this grunt plugin and it works great but the problem I am having is that it is injecting files into index.html with an extra line (Empty)
So because of this issue the grunt usemin plugin is not replacing the list of script tags by the equivalent concatenated file (which gets generated properly).
When I remove the empty lines manually then usemin is able to inject the concatenated js file