Gulp.js, watch task runs twice when saving files

后端 未结 12 1249
花落未央
花落未央 2020-12-15 11:03

Given the following piece of code from my gulpfile.js, everytime I save or change a file, the task runs twice instead of one single time, why is that? I just want it to run

12条回答
  •  生来不讨喜
    2020-12-15 12:05

    Seems like the answer to this question is a feature of the editor that was used, Coda 2. Based on some of the comments here and testing with multiple editors, it seems like Coda 2 saves a temporary file or similar and that causes the gulp watch function to be run twice.

    I have not found a viable solution to this when using Coda 2, ended up with switching to Sublime Text 3.

提交回复
热议问题