久久久久久久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 任務(wù)中刪除文件

        Deleting files in a gulp task(在 gulp 任務(wù)中刪除文件)
          <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 任務(wù)中刪除文件的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時(shí)送ChatGPT賬號(hào)..

                  我有一個(gè) gulp 任務(wù),我想獲取一些源文件并將它們復(fù)制到 build/premiumbuild/free 然后從構(gòu)建/免費(fèi).

                  我的嘗試是這樣做的:

                  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"));});

                  這會(huì)導(dǎo)致錯(cuò)誤:

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

                  如何在刪除端口時(shí)完成此操作?有沒有更好的方法來做到這一點(diǎn)?

                  解決方案

                  我會(huì)使用 gulp-filter 只刪除不應(yīng)該從第二個(gè)目的地復(fù)制的內(nèi)容.

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

                  這是一個(gè)有效的 gulpfile:

                  var gulp = require("gulp");var filter = require("gulp-filter");變種德爾=要求(德爾");gulp.task("干凈", function () {返回德爾(構(gòu)建");});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/** 這意味著它們是相對(duì)于 src 的.

                  還要注意,del 不能直接傳遞給 .pipe(),因?yàn)樗祷匾粋€(gè)承諾.它可以從任務(wù)中返回,就像 clean 任務(wù)一樣.

                  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.

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

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

                  相關(guān)文檔推薦

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

                          • 主站蜘蛛池模板: 中午字幕在线观看 | 色在线视频网站 | 在线黄色网 | 国产日韩欧美精品一区二区 | 亚洲一区二区三区视频 | 国产免费a | 久久国产日韩 | 日本一区二区高清不卡 | a国产视频| 亚洲精品3 | 欧美日在线 | 亚洲精品国产电影 | 欧美专区日韩专区 | 精品日韩一区二区 | 成人黄色网址大全 | 亚洲欧美一区二区三区视频 | 国产区免费视频 | 亚洲精品成人av久久 | 久久久免费电影 | 欧美国产日韩在线观看成人 | 午夜精品在线观看 | 91亚洲国产 | 国产伦一区二区三区久久 | 91视频正在播放 | 成人毛片网 | 成人午夜激情 | 日韩图区 | www在线| 成人免费视频网站在线观看 | 拍真实国产伦偷精品 | 亚洲欧美日韩成人在线 | 午夜寂寞福利视频 | 国产精品国产 | 欧美激情精品久久久久久变态 | 国内精品99 | 欧美激情欧美激情在线五月 | 国产一二三区免费视频 | 在线不卡视频 | 91伦理片| 羞羞羞视频 | 日韩在线观看精品 |