grunt
grunt copied to clipboard
LF(\n) in options of a multi task is replaced by CRLF(\r\n) on Windows.
grunt.initConfig({
some: {
a: {
options: {
x: "\n"
}
}
}
});
grunt.registerTask('s', [
'some:a',
]);
grunt.registerMultiTask('some', function() {
console.log(this.options()); // { x: '\r\n' }
});
An option's value is processed by grunt.util.normalizelf() in grunt.template.process(). Is this collect?
Some packages(ex. grunt-contrib-concat) do not work correctly because this behavior.
Not work! The linefeed option is hard coded in grunt-legacy-util
module. You can replace \r\n
yourself.