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

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

        <legend id='rkM8b'><style id='rkM8b'><dir id='rkM8b'><q id='rkM8b'></q></dir></style></legend>
        <i id='rkM8b'><tr id='rkM8b'><dt id='rkM8b'><q id='rkM8b'><span id='rkM8b'><b id='rkM8b'><form id='rkM8b'><ins id='rkM8b'></ins><ul id='rkM8b'></ul><sub id='rkM8b'></sub></form><legend id='rkM8b'></legend><bdo id='rkM8b'><pre id='rkM8b'><center id='rkM8b'></center></pre></bdo></b><th id='rkM8b'></th></span></q></dt></tr></i><div id='rkM8b'><tfoot id='rkM8b'></tfoot><dl id='rkM8b'><fieldset id='rkM8b'></fieldset></dl></div>
      1. Gulp clean/del 行为已经改变

        时间:2023-05-29

        1. <tfoot id='2dSGg'></tfoot>

          1. <small id='2dSGg'></small><noframes id='2dSGg'>

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

                • <bdo id='2dSGg'></bdo><ul id='2dSGg'></ul>

                    <tbody id='2dSGg'></tbody>
                  本文介绍了Gulp clean/del 行为已经改变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我的 gulpfile.js 的一部分

                  Part of my gulpfile.js

                  const del = require('del');
                  const chrome_dir = 'build/chrome';
                  const ff_dir = 'build/firefox';
                  
                  gulp.task('clean', function (cb) {
                      del([chrome_dir, ff_dir], cb);
                  });
                  
                  
                  gulp.task('default', ['clean'], function () {
                      gulp.start('build packages', 'JS Backend', 'i18n', 'ExtRes', 'styles', 'JS Content', 'templates');
                  });
                  

                  效果很好.
                  然后我安装了一个新系统,可能会有新版本的 gulp 和 del 等等.
                  现在 gulp 在清洁后停止.
                  我可以手动调用所有任务,效果很好.
                  只能是改变del的行为...

                  worked well.
                  Then I installed a new system and there maybe got new versions of gulp and del and whatever.
                  Now gulp stops after cleaning.
                  I can call all tasks manually, that's working fine.
                  Could only be a change in the behaviour of del...

                  我该如何解决这个问题?

                  How can I fix this?

                  推荐答案

                  v2 最重要的变化之一是它现在返回一个 Promise 而不是使用回调来处理异步.来自 del 文档.

                  One of the most important changes on v2 is that now it returns a Promise instead of using a callback to handle async. From del documentation.

                  您只需重新编写这部分代码:

                  You simply have to re-write this part of your code:

                  gulp.task('clean', function (cb) {
                      del([chrome_dir, ff_dir], cb);
                  });
                  

                  像这样:

                  gulp.task('clean', function () {
                      return del([chrome_dir, ff_dir]);
                  });
                  

                  这篇关于Gulp clean/del 行为已经改变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何使用打字稿文件运行 gulp 下一篇:Gulp - 复制和重命名文件

                  相关文章

                  最新文章

                • <small id='N0KC5'></small><noframes id='N0KC5'>

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

                      <legend id='N0KC5'><style id='N0KC5'><dir id='N0KC5'><q id='N0KC5'></q></dir></style></legend>

                      <tfoot id='N0KC5'></tfoot>