久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <tfoot id='nZqxz'></tfoot>
    <legend id='nZqxz'><style id='nZqxz'><dir id='nZqxz'><q id='nZqxz'></q></dir></style></legend>

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

        <bdo id='nZqxz'></bdo><ul id='nZqxz'></ul>

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

        在 gulp 任務中刪除文件

        Deleting files in a gulp task(在 gulp 任務中刪除文件)
          <tbody id='A7Gyp'></tbody>
          • <tfoot id='A7Gyp'></tfoot>

                • <bdo id='A7Gyp'></bdo><ul id='A7Gyp'></ul>

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

                  <legend id='A7Gyp'><style id='A7Gyp'><dir id='A7Gyp'><q id='A7Gyp'></q></dir></style></legend>
                • <i id='A7Gyp'><tr id='A7Gyp'><dt id='A7Gyp'><q id='A7Gyp'><span id='A7Gyp'><b id='A7Gyp'><form id='A7Gyp'><ins id='A7Gyp'></ins><ul id='A7Gyp'></ul><sub id='A7Gyp'></sub></form><legend id='A7Gyp'></legend><bdo id='A7Gyp'><pre id='A7Gyp'><center id='A7Gyp'></center></pre></bdo></b><th id='A7Gyp'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='A7Gyp'><tfoot id='A7Gyp'></tfoot><dl id='A7Gyp'><fieldset id='A7Gyp'></fieldset></dl></div>

                  本文介紹了在 gulp 任務中刪除文件的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我有一個 gulp 任務,我想獲取一些源文件并將它們復制到 build/premiumbuild/free 然后從構建/免費.

                  我的嘗試是這樣做的:

                  gulp.task("build", ["clean"], function () {gulp.src(["src/*", "!src/composer.*", "LICENSE"]).pipe(gulp.dest("build/premium")).pipe(del(["build/free/plugins/*", "!build/free/plugins/index.php"])).pipe(gulp.dest("build/free"));});

                  這會導致錯誤:

                  TypeError: dest.on 不是函數在 DestroyableTransform.Stream.pipe (stream.js:45:8)在 Gulp.<匿名>(/Users/gezim/projects/myproj/gulpfile.js:9:6)

                  如何在刪除端口時完成此操作?有沒有更好的方法來做到這一點?

                  解決方案

                  我會使用 gulp-filter 只刪除不應該從第二個目的地復制的內容.

                  我將任務的意圖解釋為希望 src 中存在的所有內容都存在于 build/premium 中.但是,build/free 應該排除最初在 src/plugins 中但仍應包含 src/plugins/index.php 的所有內容.p>

                  這是一個有效的 gulpfile:

                  var gulp = require("gulp");var filter = require("gulp-filter");變種德爾=要求(德爾");gulp.task("干凈", function () {返回德爾(構建");});gulp.task("build", ["clean"], function () {返回 gulp.src(["src/**", "!src/composer.*", "LICENSE"]).pipe(gulp.dest("build/premium")).pipe(filter(["**", "!plugins/**", "plugins/index.php"])).pipe(gulp.dest("build/free"));});

                  傳遞給 filter 的模式是 relative 路徑.由于 gulp.src 模式具有 src/** 這意味著它們是相對于 src 的.

                  還要注意,del 不能直接傳遞給 .pipe(),因為它返回一個承諾.它可以從任務中返回,就像 clean 任務一樣.

                  I have a gulp task in which I want to take some source files and copy them to build/premium and build/free and then remove some extra files from build/free.

                  My attempt at that was doing this:

                  gulp.task("build", ["clean"], function () {
                    gulp.src(["src/*", "!src/composer.*", "LICENSE"])
                      .pipe(gulp.dest("build/premium"))
                      .pipe(del(["build/free/plugins/*", "!build/free/plugins/index.php"]))
                      .pipe(gulp.dest("build/free"));
                  });
                  

                  Which results in an error:

                  TypeError: dest.on is not a function
                      at DestroyableTransform.Stream.pipe (stream.js:45:8)
                      at Gulp.<anonymous> (/Users/gezim/projects/myproj/gulpfile.js:9:6)
                  

                  How do I accomplish this the deleting port? Is there a better way altogether to do this?

                  解決方案

                  I would use gulp-filter to drop only what should not be copied from the 2nd destination.

                  I interpreted the intent of the task as wanting everything present in src to be present in build/premium. However, build/free should exclude everything which was originally in src/plugins but should still include src/plugins/index.php.

                  Here is a working gulpfile:

                  var gulp = require("gulp");
                  var filter = require("gulp-filter");
                  var del = require("del");
                  
                  gulp.task("clean", function () {
                    return del("build");
                  });
                  
                  gulp.task("build", ["clean"], function () {
                    return gulp.src(["src/**", "!src/composer.*", "LICENSE"])
                      .pipe(gulp.dest("build/premium"))
                      .pipe(filter(["**", "!plugins/**", "plugins/index.php"]))
                      .pipe(gulp.dest("build/free"));
                  });
                  

                  The patterns passed to filter are relative paths. Since the gulp.src pattern has src/** it means they are relative to src.

                  Note also that del cannot be passed straight to .pipe() as it returns a promise. It can be returned from a task, like the clean task does.

                  這篇關于在 gulp 任務中刪除文件的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Browserify, Babel 6, Gulp - Unexpected token on spread operator(Browserify,Babel 6,Gulp - 傳播運算符上的意外令牌)
                  Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以將標志傳遞給 Gulp 以使其以不同的方式運行任務?)
                  Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
                  How to run Gulp tasks sequentially one after the other(如何一個接一個地依次運行 Gulp 任務)
                  Stylesheet not loaded because of MIME-type(由于 MIME 類型而未加載樣式表)
                  Visual Studio 2015 crashes when opening Javascript files(打開 Javascript 文件時 Visual Studio 2015 崩潰)

                    <tfoot id='wabVi'></tfoot>

                          <tbody id='wabVi'></tbody>
                        <legend id='wabVi'><style id='wabVi'><dir id='wabVi'><q id='wabVi'></q></dir></style></legend>

                        • <bdo id='wabVi'></bdo><ul id='wabVi'></ul>

                            <i id='wabVi'><tr id='wabVi'><dt id='wabVi'><q id='wabVi'><span id='wabVi'><b id='wabVi'><form id='wabVi'><ins id='wabVi'></ins><ul id='wabVi'></ul><sub id='wabVi'></sub></form><legend id='wabVi'></legend><bdo id='wabVi'><pre id='wabVi'><center id='wabVi'></center></pre></bdo></b><th id='wabVi'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='wabVi'><tfoot id='wabVi'></tfoot><dl id='wabVi'><fieldset id='wabVi'></fieldset></dl></div>
                          • <small id='wabVi'></small><noframes id='wabVi'>

                          • 主站蜘蛛池模板: 91电影| 97国产一区二区精品久久呦 | 欧美日韩综合 | 日韩精品久久一区二区三区 | 91xxx在线观看| 久久久久久国产 | 国产三级 | 成人免费日韩 | 欧美激情综合 | 青青草这里只有精品 | 国产精品久久久久久久久久免费看 | 久久午夜国产精品www忘忧草 | 中文字幕国产一区 | 欧美一区二区三区在线看 | 欧美三级视频在线观看 | 国产视频一区二区在线观看 | 欧美一区二区三区视频 | 日本手机在线 | 午夜精品视频在线观看 | 久久精品综合 | 欧美精品一区在线 | 999热精品视频 | 一区二区中文字幕 | 久久精品网 | 日韩在线第一 | 天天综合国产 | 人人性人人性碰国产 | 国产综合久久 | 黄片毛片免费观看 | 成人婷婷 | 久久99精品久久久久 | 亚洲视频在线观看 | 久久夜色精品国产 | 免费a级毛片在线播放 | 91成人在线 | 成人一区二区三区视频 | 精品国产aⅴ | 亚洲视频一区二区三区 | 最近免费日本视频在线 | 亚洲成在线观看 | www..com18午夜观看 |