Skip to content

Detect whether a file uses LF or CR+LF and follow the existing style#153

Merged
floridoo merged 1 commit into
gulp-sourcemaps:masterfrom
shinnn:detect-newline
Dec 27, 2015
Merged

Detect whether a file uses LF or CR+LF and follow the existing style#153
floridoo merged 1 commit into
gulp-sourcemaps:masterfrom
shinnn:detect-newline

Conversation

@shinnn
Copy link
Copy Markdown
Contributor

@shinnn shinnn commented Sep 28, 2015

(Fix #137)

This pull request is an implementation of #137 (comment).

  1. Detect whether a file uses \n or \r\n by using detect-newline module.
  2. Use the detected newline when appending Source Map to the bottom of the file

I can add sourceMapNewline option or something else to force using specific newline regardless of the detected one, but I didn't add it to this pull request because most of the users prefer the default behavior and don't need to change it. What do you think, @floridoo?

floridoo pushed a commit that referenced this pull request Dec 27, 2015
Detect whether a file uses LF or CR+LF and follow the existing style
@floridoo floridoo merged commit 3efdcc9 into gulp-sourcemaps:master Dec 27, 2015
@shinnn shinnn deleted the detect-newline branch December 27, 2015 22:50
ncoden added a commit to ncoden/foundation-sites that referenced this pull request Dec 7, 2016
Unpin `gulp-sourcemaps` from `1.6.0` and update it to `^2.2.1`.

This version was pinned because of a bug introduced in `v1.7.0` (PR
 foundation#153, issue foundation#230). The bug was resolved in `v1.7.2` (PR foundation#235)

See:
- gulp-sourcemaps/gulp-sourcemaps#230
- gulp-sourcemaps/gulp-sourcemaps#153
- gulp-sourcemaps/gulp-sourcemaps#235
ncoden added a commit to ncoden/foundation-sites that referenced this pull request Dec 7, 2016
Unpin `gulp-sourcemaps` from `1.6.0` and update it to `^2.2.1`.

This version was pinned because of a bug introduced in `v1.7.0` (PR
 foundation#153, issue foundation#230). The bug was resolved in `v1.7.2` (PR foundation#235)

See:
- gulp-sourcemaps/gulp-sourcemaps#230
- gulp-sourcemaps/gulp-sourcemaps#153
- gulp-sourcemaps/gulp-sourcemaps#235
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants