Gulp series does not update things unless the last task is run
See original GitHub issueHi! I do not know if it is a bug, however I cannot find any information bout this behavior in the docs and it might be a bug, namely, I’ve got such gulp tasks:
gulp.task 'incVersionDev', (done) ->
gulp.src './package.json'
.pipe transform 'utf8', incVersionDev
.pipe gulp.dest('.')
done()
gulp.task 'publish' , gulp.series 'build', 'incVersionDev', 'copy_package_config', (done) ->
# execSync 'cat ./package.json', {stdio:'inherit'}
execSync 'cd lib && npm publish', {stdio:'inherit'}
done()
when I run gulp publish
I got npm
error that I cannot publish the same version twice. What happens is that incVersionDev
runs but it do not writes package.json
unless are series tasks are run. If I uncomment echo of package.json
I can clearly see it was not changed. However if I comment the line execSync 'cd lib && npm publish', {stdio:'inherit'}
, everything works - the version is incremented.
It seems like gulp is not making changes to files when running series until series is finished - if that is the case, is it the behavior we want? If so, is there any way to accomplish what I want to do here?
gulp version: next npm version: 5.5.1
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
@wdanilo you’ve fixed your stream issue (of course, you’re relying on implicit returns). For your other issue: this is not a support forum. Support questions should be directed to StackOverflow, but you might want to look into your usage of
npx
inside thepublish
script.Thank you!