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

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

    1. <tfoot id='og9Cj'></tfoot>

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

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

        gulp.dest 沒有創建目標文件夾

        gulp.dest not creating destination folder(gulp.dest 沒有創建目標文件夾)
        • <i id='4ocaF'><tr id='4ocaF'><dt id='4ocaF'><q id='4ocaF'><span id='4ocaF'><b id='4ocaF'><form id='4ocaF'><ins id='4ocaF'></ins><ul id='4ocaF'></ul><sub id='4ocaF'></sub></form><legend id='4ocaF'></legend><bdo id='4ocaF'><pre id='4ocaF'><center id='4ocaF'></center></pre></bdo></b><th id='4ocaF'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='4ocaF'><tfoot id='4ocaF'></tfoot><dl id='4ocaF'><fieldset id='4ocaF'></fieldset></dl></div>
            <tbody id='4ocaF'></tbody>

            • <bdo id='4ocaF'></bdo><ul id='4ocaF'></ul>

              <small id='4ocaF'></small><noframes id='4ocaF'>

                <tfoot id='4ocaF'></tfoot>
                1. <legend id='4ocaF'><style id='4ocaF'><dir id='4ocaF'><q id='4ocaF'></q></dir></style></legend>
                  本文介紹了gulp.dest 沒有創建目標文件夾的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我的 gulp 代碼部分看起來像這樣

                  My gulp code looks like this, in part

                  gulp.src(['../application-base/**/**.js', '!../application-base/assets/**/**.js'], { base: './' })
                      .pipe(gulpPlumber({
                          errorHandler: function (error) {
                              console.log(`
                  Error ${error}`);
                              this.emit('end');
                          }
                      }))
                      .pipe(gprint(filePath => "Transpiling: " + filePath.replace('..\application-base\', '')))
                      .pipe(babel({ compact: false }))
                      .pipe(gulp.dest('../application-base-transpiled/'))
                      .on('end', () => done());
                  

                  如果我改變了

                  .pipe(gulp.dest('../application-base-transpiled/'))

                  .pipe(gulp.dest(''))

                  然后創建轉譯文件,并覆蓋原始文件.問題是

                  then the transpiled files are created, and overwrite the originals. The problem is that

                  .pipe(gulp.dest('../application-base-transpiled/'))

                  不保存文件,在 application-base-transpiled

                  如您所見,我正在使用一個底座,否則它似乎可以工作.

                  As you can see, I am using a base, which seems to work otherwise.

                  我錯過了什么?

                  編輯

                  我看的更仔細了,好像和

                  I looked more closely, and it seems even with

                  .pipe(gulp.dest('../application-base-transpiled/'))

                  Gulp 仍在將轉譯后的文件放到原來的位置,覆蓋原來的位置.Gulp 不喜歡我正在傳遞的目標,并且默默地忽略了這一點.

                  Gulp is still placing the transpiled files into the original place, overwriting the original. There's something about the dest I'm passing that Gulp doesn't like, and is ignoring silently.

                  編輯 2

                  似乎刪除 base 選項解決了這個問題,這與我在其他地方看到的建議相反.gulp.dest 的文檔并沒有真正討論這個問題.

                  It seems removing the base option solves this problem, contrary to advice I've seen elsewhere. The docs for gulp.dest don't really discuss this.

                  誰能提供一些對此的見解?

                  Can anyone provide some insight into this?

                  編輯 3

                  根據 Sven 的回答,我試過了

                  Per Sven's answer, I tried this

                  gulp.src(['**/**.js', '!assets/**/**.js'], { base: '../application-base' })
                      .pipe(gulpPlumber({
                          errorHandler: function errorHandler(error) {
                              console.log('
                  Error ' + error);
                              this.emit('end');
                          }
                      }))
                      .pipe(gprint(filePath => "Transpiling: " + filePath.replace('..\application-base\', '')))
                      .pipe(babel({ compact: false }))
                      .pipe(gulp.dest('../application-base-transpiled/'))
                      .on('end', () => done());
                  

                  但似乎基礎被忽略了,我自己當前目錄中的文件被抓取并轉換到位(我想要的最后一件事 - 幸運的是 GIT 有助于消除損壞).

                  But it seems the base is being ignored, and the files from my own current directory are being grabbed and transpiled in place (the last thing I want - fortunately GIT was helpful in undoing the damage).

                  src 使用數組時會忽略基本參數嗎?

                  Is the base parameter ignored when using an array for src?

                  推薦答案

                  在 gulp 流中,文件的目標路徑遵循以下偽等式:

                  In gulp streams the destination path of a file follows this pseudo-equation:

                  gulp.dest + (gulp.src 沒有前導 base) = 文件的目標路徑

                  gulp.dest + (gulp.src without leading base) = dest path of file

                  例子:

                  gulp.src('src/js/foo.js', {base:'src/'}).pipe(gulp.dest('dist/'));
                  

                  結果:

                  'dist/' + ('src/js/foo.js' 沒有前導 'src/') ='dist/js/foo.js'

                  'dist/' + ('src/js/foo.js' without leading 'src/') = 'dist/js/foo.js'

                  在你的情況下:

                  '../application-base-transpiled/' + ('../application-base/foo/bar.js' 不帶前導'./') = '../application-base-transpiled/../application-base/foo/bar.js'

                  '../application-base-transpiled/' + ('../application-base/foo/bar.js' without leading './') = '../application-base-transpiled/../application-base/foo/bar.js'

                  所以你的文件最終在原始目錄中.

                  So your files end up in the original directory.

                  您必須將 {base: '../application-base/'} 傳遞給 gulp.src() 以使您的示例工作.

                  You have to pass {base: '../application-base/'} to gulp.src() to make your example work.

                  注意

                  您仍然需要在 src 路徑中包含 '../application-base/'.base 的目的是根據我上面的公式來操縱 dest 路徑;它確實用于減少您在 gulp.src 中鍵入的擊鍵次數.所以最終的結果應該是這樣的

                  You still need to include '../application-base/' in your src path. The purpose of base is to manipulate the dest path, per my equation above; it does not serve the purpose of lessening the number of keystrokes you type in gulp.src. So the end result should be something like this

                  gulp.src(['../application-base/**/**.js'], { base: '../application-base' })
                          .pipe(gulpPlumber({
                              errorHandler: function errorHandler(error) {
                                  console.log('
                  Error ' + error);
                                  this.emit('end');
                              }
                          }))
                          .pipe(gprint(filePath => "Transpiling: " + filePath.replace('..\application-base\', '')))
                          .pipe(babel({ compact: false }))
                          .pipe(gulp.dest('../application-base-transpiled'))
                          .on('end', () => done());
                  

                  <小時>

                  如果你沒有通過 base 選項 到 gulp.src() 設置了默認值:


                  If you don't pass a base option to gulp.src() a default is set:

                  默認值:glob 開始之前的所有內容(參見 glob2base)

                  Default: everything before a glob starts (see glob2base)

                  這意味著你傳遞給 gulp.src() 的模式中的第一個 *** 之前的所有內容用作 base 選項.由于您的模式是 ../application-base/**/**.js,您的 base 選項會自動變為 ../application-base/.

                  What this means is that everything up to the first ** or * in the pattern that you pass to gulp.src() is used as the base option. Since your pattern is ../application-base/**/**.js, your base option automatically becomes ../application-base/.

                  這篇關于gulp.dest 沒有創建目標文件夾的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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='P8MNe'></tfoot>
                    <tbody id='P8MNe'></tbody>
                    <i id='P8MNe'><tr id='P8MNe'><dt id='P8MNe'><q id='P8MNe'><span id='P8MNe'><b id='P8MNe'><form id='P8MNe'><ins id='P8MNe'></ins><ul id='P8MNe'></ul><sub id='P8MNe'></sub></form><legend id='P8MNe'></legend><bdo id='P8MNe'><pre id='P8MNe'><center id='P8MNe'></center></pre></bdo></b><th id='P8MNe'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='P8MNe'><tfoot id='P8MNe'></tfoot><dl id='P8MNe'><fieldset id='P8MNe'></fieldset></dl></div>

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

                          • <bdo id='P8MNe'></bdo><ul id='P8MNe'></ul>
                            <legend id='P8MNe'><style id='P8MNe'><dir id='P8MNe'><q id='P8MNe'></q></dir></style></legend>
                            主站蜘蛛池模板: 亚洲视频在线一区 | 男人天堂社区 | 国产三级精品视频 | 成人在线视频免费观看 | 欧美日韩亚洲系列 | 欧美日韩国产在线观看 | 91网站视频在线观看 | 亚洲成人一区二区 | 天天艹| 亚洲日韩欧美一区二区在线 | 国产精品久久久久久久久久久免费看 | 国产亚洲日本精品 | 精品国产乱码久久久久久蜜柚 | 九九热在线视频 | 亚洲国产成人精品女人久久久野战 | 久久99精品久久久久久 | 久久精品国产一区二区三区 | 一级黄色片毛片 | 国产高清一区二区三区 | 免费一区二区在线观看 | 天天综合永久入口 | 欧美精品一区三区 | 日韩成人精品 | 日韩毛片视频 | 亚洲欧美日韩中文在线 | www.国产精 | 久久看片 | 久久久久久成人 | 色婷婷精品国产一区二区三区 | 在线免费观看毛片 | 91中文字幕在线 | 国产精品欧美一区二区三区 | 日韩资源 | 日韩一二三区 | 亚洲激情一级片 | 在线免费观看日本视频 | 久久久久91 | 日本电影韩国电影免费观看 | av片在线观看网站 | 中文字幕在线观看视频一区 | 久久99视频免费观看 |