grunt icon indicating copy to clipboard operation
grunt copied to clipboard

LF(\n) in options of a multi task is replaced by CRLF(\r\n) on Windows.

Open yiida-dev opened this issue 8 years ago • 1 comments

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.

yiida-dev avatar Aug 30 '16 16:08 yiida-dev

Not work! The linefeed option is hard coded in grunt-legacy-util module. You can replace \r\n yourself.

richardchen85 avatar Oct 24 '17 02:10 richardchen85