Use the same replace in multiple pipes
Open
Nobody has claimed this yet.
bug
- Dominant language
- JavaScript
- Stars
- 495
- Forks
- 87
- PR merge metrics
- No merged PRs in 30d
Description
When I use the same replace in two pipes, one of the two pipes seemst to fail.
I try something like this:
var replace = require('gulp-replace');
var replaceStuff = replace(/foo/, function (match) {
// ... do stuff...
return 'bar';
});
return gulp.src('path')
.pipe(replaceStuff)
.pipe(gulp.dest('dest'));
return gulp.src('other/path')
.pipe(replaceStuff)
.pipe(gulp.dest('other/dest'));
Is this a bug or am I overlooking something?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two gulp pipelines shown in the issue, using the same replace instance for both paths. Inspect gulp-replace's stream entry point to determine why the second pipeline fails, then add coverage for both pipelines and verify that each replacement completes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100