question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.write() is appending a new line when using loadMaps:true

See original GitHub issue

return gulp.src('source/**/*.js') .pipe(sourcemaps.init({loadMaps: true})) .pipe(sourcemaps.write('../../../tests-tmp')) .pipe(gulp.dest('source'));

I’m trying to write the sourcemaps path for all my js files but I realised it was appending the path every the write function was called. Then I’ve started using loadMaps:true and this is writing the paths only in the files that had no sourcemap before, but write function is appending a new line at the end of my js files.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12

github_iconTop GitHub Comments

2reactions
nmccreadycommented, Nov 18, 2016

@devamora PR’d #255

0reactions
devamoracommented, Nov 22, 2016

@nmccready Yes, once the sourcemap is appended is not modifying the file anymore 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to append new data onto a new line - python
If you want a newline, you have to write one explicitly. The usual way is like this: hs.write(name + "\n"). This uses a...
Read more >
appending to new line in text file - Oracle Communities
I set the append parameter to true and I try to output the new line character after I write the string to the...
Read more >
add new line in string - Power Platform Community - Microsoft
Solved: Hi I want to add new line sting which are displaying on label in power app. In below code I am using...
Read more >
How to Add a New Line in a PowerShell String | ITPro Today
Learn how to add a new line in a PowerShell string. This article explains three methods, with examples.
Read more >
How to Add a New Line (Carriage Return) in a String in VBA
This tutorial covers different ways to add a new line (Carriage Return) that you can use while combining multiple strings with a code....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found