gulp.run is deprecated. How do I compose tasks?

后端 未结 10 1239
感情败类
感情败类 2020-12-22 18:57

Here is a composed task I don\'t know how to replace it with task dependencies.

...
gulp.task(\'watch\', function () {
 var server = function(){
  gulp.run(\         


        
10条回答
  •  温柔的废话
    2020-12-22 19:53

    As @dman mentions that, gulp.start will be discarded in the next version. Also it can be seen in this issue of gulp.

    And in the comments of the answer of @Pavel Evstigneev, @joemaller mentions that we can use run-sequence in this scenario.

    But please note that, the author of run-sequence says :

    This is intended to be a temporary solution until the release of gulp 4.0 which has support for defining task dependencies in series or in parallel.

    Be aware that this solution is a hack, and may stop working with a future update to gulp.

    So, before gulp 4.0, we can use run-sequence, after 4.0, we can just use gulp.

提交回复
热议问题