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.

Set skipBinary: true by default

See original GitHub issue

Hi,

When I apply gulp-replace to a folder containing a jpeg or a png file, the resulting file is broken. For example:

gulp.task('something',  () => {
  del.sync('dist');
  return gulp.src('**')
    .pipe($.replace(/^YOUR_UNIQUE_STRING$/gm, ''))
    .pipe(gulp.dest('dist'));
});

Smaller files are not affected though, and just for sanity check the same procedure without gulp-replace works fine (jpegs and pngs are not broken).

gulp.task('something',  () => {
  del.sync('dist');
  return gulp.src('**')
    .pipe(gulp.dest('dist'));
});

Can you please check it out and get it fixed? Thx!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
lazdcommented, May 16, 2018

1.0.0 released with skipBinary: true by default.

0reactions
lazdcommented, May 16, 2018

I suppose we could change the default to skipBinary: true but it does feel a bit odd that anyone would pass a binary file to replace() in the first place, that’s a lazy glob…

Read more comments on GitHub >

github_iconTop Results From Across the Web

MySQL Shell 8.0 :: 11.6 Dump Loading Utility
Setting this option to false excludes the data files in the dump from the load. The default is true , meaning that the...
Read more >
ExUnit v1.6.6
Defaults to true ;. :capture_log - if ExUnit should default to keeping track of log messages and print them on test failure. Can...
Read more >
Docs: Options
This option checks column character sets as well as table default character sets. ... If allow-unsafe is set to true, these operations are...
Read more >
Hsqldb User Guide
Memory tables are the default type when the CREATE TABLE command is used. ... SET PROPERTY "sql.enforce_strict_size" TRUE will enforce sizes for CHARACTER ......
Read more >
Advanced Installation Instructions
By default, ELECTRON_CUSTOM_DIR is set to v$VERSION . ... errors are the result of network problems and not actual issues with the electron...
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