• <tfoot id='d8IhE'></tfoot>
      <bdo id='d8IhE'></bdo><ul id='d8IhE'></ul>

      <legend id='d8IhE'><style id='d8IhE'><dir id='d8IhE'><q id='d8IhE'></q></dir></style></legend>
    1. <i id='d8IhE'><tr id='d8IhE'><dt id='d8IhE'><q id='d8IhE'><span id='d8IhE'><b id='d8IhE'><form id='d8IhE'><ins id='d8IhE'></ins><ul id='d8IhE'></ul><sub id='d8IhE'></sub></form><legend id='d8IhE'></legend><bdo id='d8IhE'><pre id='d8IhE'><center id='d8IhE'></center></pre></bdo></b><th id='d8IhE'></th></span></q></dt></tr></i><div id='d8IhE'><tfoot id='d8IhE'></tfoot><dl id='d8IhE'><fieldset id='d8IhE'></fieldset></dl></div>

      <small id='d8IhE'></small><noframes id='d8IhE'>

      1. 将 gulp.start 函数迁移到 Gulp v4

        时间:2023-05-28

      2. <legend id='12ETc'><style id='12ETc'><dir id='12ETc'><q id='12ETc'></q></dir></style></legend>
          <i id='12ETc'><tr id='12ETc'><dt id='12ETc'><q id='12ETc'><span id='12ETc'><b id='12ETc'><form id='12ETc'><ins id='12ETc'></ins><ul id='12ETc'></ul><sub id='12ETc'></sub></form><legend id='12ETc'></legend><bdo id='12ETc'><pre id='12ETc'><center id='12ETc'></center></pre></bdo></b><th id='12ETc'></th></span></q></dt></tr></i><div id='12ETc'><tfoot id='12ETc'></tfoot><dl id='12ETc'><fieldset id='12ETc'></fieldset></dl></div>
            • <bdo id='12ETc'></bdo><ul id='12ETc'></ul>

                    <tbody id='12ETc'></tbody>
                • <small id='12ETc'></small><noframes id='12ETc'>

                  <tfoot id='12ETc'></tfoot>
                  本文介绍了将 gulp.start 函数迁移到 Gulp v4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我一直在将我所有的 gulp v3 代码库迁移到 v4.但是我被困在我有 gulp start 功能的地方,当我在 gulp v4 中运行 gulp start 时它会抛出一个错误.

                  I have been migrating all of my gulp v3 code bases into v4. However I'm stuck at a point where I have gulp start function and it throws me an error when I run gulp start in gulp v4.

                  这是我在版本 3 中的功能:

                  This is the function I had in version 3:

                  gulp.task('default', ['watch'], function () {
                  
                      gulp.start('styles', 'scripts', 'images');
                  
                  });

                  当迁移到 gulp v4 时,我实现了这个功能:

                  When migrating to v4 of gulp I implemented this function:

                  gulp.task('default', gulp.parallel('watch', function(done) {
                  
                      gulp.start('styles', 'scripts', 'images');
                  
                      done();
                  
                  }));

                  如何使用新的 gulp 版本完成相同的过程?我需要在 gulp.series 中使用 gulp.parallel 吗?

                  How to accomplish the same process with the new gulp version? Do I need to use gulp.parallel inside gulp.series?

                  推荐答案

                  把你的任务改成函数后,简单使用;

                  After changing your tasks to functions, simply use;

                  gulp.task('default', gulp.series (watch, gulp.parallel(styles, scripts, images),
                  
                      function (done) { done(); }    
                  ));
                  

                  watch 函数将首先运行,然后是样式、脚本和图像函数并行运行.

                  The watch function will run first, then the styles, scripts and images functions in parallel.

                  来自 gulp.series 文档:

                  组合的嵌套深度没有强加限制使用 series() 和 parallel() 进行操作.

                  There are no imposed limits on the nesting depth of composed operations using series() and parallel().

                  这篇关于将 gulp.start 函数迁移到 Gulp v4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:aspnet core如何在deploy上构建webpack 下一篇:使用 nodejs gulp 在 Less 中导入 .css 文件

                  相关文章

                  最新文章

                  <i id='UgRnX'><tr id='UgRnX'><dt id='UgRnX'><q id='UgRnX'><span id='UgRnX'><b id='UgRnX'><form id='UgRnX'><ins id='UgRnX'></ins><ul id='UgRnX'></ul><sub id='UgRnX'></sub></form><legend id='UgRnX'></legend><bdo id='UgRnX'><pre id='UgRnX'><center id='UgRnX'></center></pre></bdo></b><th id='UgRnX'></th></span></q></dt></tr></i><div id='UgRnX'><tfoot id='UgRnX'></tfoot><dl id='UgRnX'><fieldset id='UgRnX'></fieldset></dl></div>

                  1. <legend id='UgRnX'><style id='UgRnX'><dir id='UgRnX'><q id='UgRnX'></q></dir></style></legend>
                      <bdo id='UgRnX'></bdo><ul id='UgRnX'></ul>

                  2. <tfoot id='UgRnX'></tfoot>

                      <small id='UgRnX'></small><noframes id='UgRnX'>