klei / grunt-injector

Inject references to files into other files (think scripts and stylesheets into an html file)
MIT License
106 stars 38 forks source link

make lineEnding default value to the destination file's line ending #36

Closed ptitgraig closed 8 years ago

ptitgraig commented 8 years ago

Today's default lineEnding is set to '\n'. Even though one can change it thanks to the option option.lineEnding, it becomes hard to maintain if the build occurs on different platforms. To improve the line ending behavior, I suggest that the destination/template file decide what should be the end of line for injector. This is the aim of this PR.

jt000 commented 8 years ago

Whoops. I didn't even notice your PR. I have a similar PR #38, but sets the default lineEnding to grunt.util.linefeed... Not sure which way is better

ptitgraig commented 8 years ago

@jt000 from my experience option.lineEnding won't fix the problem as you may develop on a windows env and have a build on a unix machine. I guess it's better to be plateform agonstic.