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

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

  • <legend id='WQKD3'><style id='WQKD3'><dir id='WQKD3'><q id='WQKD3'></q></dir></style></legend>

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

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

        從一個(gè) gulpfile.js 從另一個(gè) gulpfile.js 運(yùn)行 gulp 任務(wù)

        Running gulp task from one gulpfile.js from another gulpfile.js(從一個(gè) gulpfile.js 從另一個(gè) gulpfile.js 運(yùn)行 gulp 任務(wù))
        <i id='CfXjx'><tr id='CfXjx'><dt id='CfXjx'><q id='CfXjx'><span id='CfXjx'><b id='CfXjx'><form id='CfXjx'><ins id='CfXjx'></ins><ul id='CfXjx'></ul><sub id='CfXjx'></sub></form><legend id='CfXjx'></legend><bdo id='CfXjx'><pre id='CfXjx'><center id='CfXjx'></center></pre></bdo></b><th id='CfXjx'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='CfXjx'><tfoot id='CfXjx'></tfoot><dl id='CfXjx'><fieldset id='CfXjx'></fieldset></dl></div>
        1. <tfoot id='CfXjx'></tfoot>
          • <legend id='CfXjx'><style id='CfXjx'><dir id='CfXjx'><q id='CfXjx'></q></dir></style></legend>
              <bdo id='CfXjx'></bdo><ul id='CfXjx'></ul>

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

                <tbody id='CfXjx'></tbody>
                  本文介紹了從一個(gè) gulpfile.js 從另一個(gè) gulpfile.js 運(yùn)行 gulp 任務(wù)的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問題描述

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

                  也許我的方法有問題,但我有以下情況:

                  Perhaps it's something wrong with my approach but I have a following situation:

                  1. 我有一個(gè)包含 gulpfile 的 component-a.它的一項(xiàng)任務(wù)(例如構(gòu)建)構(gòu)建組件并在 dist 文件夾中創(chuàng)建一個(gè)組合的 js 文件
                  2. 我有一個(gè)包含 gulpfile 的 component-b.它的一項(xiàng)任務(wù)(例如構(gòu)建)構(gòu)建組件并在 dist 文件夾中創(chuàng)建一個(gè)組合的 js 文件
                  3. 我有一個(gè)使用這兩個(gè)組件的項(xiàng)目.這個(gè)項(xiàng)目也有一個(gè) gulpfile,我想在其中編寫一個(gè)任務(wù):
                    • 從/components/component-a/gulpfile.js 執(zhí)行構(gòu)建任務(wù)
                    • 從/components/component-b/gulpfile.js 執(zhí)行構(gòu)建任務(wù)
                    • concats/components/component-a/dist/build.js 和/components/component-b/dist/build.js(我知道怎么做)
                  1. I have a component-a that has a gulpfile. One of its tasks (eg. build) builds the component and creates a combined js file in dist folder
                  2. I have a component-b that has a gulpfile. One of its tasks (eg. build) builds the component and creates a combined js file in dist folder
                  3. I have a project that uses both components. This project has a gulpfile as well and in it I would like to write a task that:
                    • executes build task from /components/component-a/gulpfile.js
                    • executes build task from /components/component-b/gulpfile.js
                    • concats /components/component-a/dist/build.js and /components/component-b/dist/build.js (I know how to do this)

                  我不知道如何從/components/component-?/gulpfile.js 執(zhí)行構(gòu)建任務(wù).是否有可能或者我應(yīng)該以其他方式處理這種情況?

                  What I don't know is how to execute the build task from /components/component-?/gulpfile.js. Is it even possible or I should deal with this situation otherwise?

                  推薦答案

                  require('child_process').spawn;

                  使用 Node 的 child_process#spawn<從不同的目錄運(yùn)行 Gulpfile 非常簡(jiǎn)單/code> 模塊.

                  嘗試根據(jù)您的需要調(diào)整以下內(nèi)容:

                  Try adapting the following to your needs:

                  // Use `spawn` to execute shell commands with Node
                  const { spawn } = require('child_process')
                  const { join } = require('path')
                  
                  /*
                    Set the working directory of your current process as
                    the directory where the target Gulpfile exists.
                  */
                  process.chdir(join('tasks', 'foo'))
                  
                  // Gulp tasks that will be run.
                  const tasks = ['js:uglify', 'js:lint']
                  
                  // Run the `gulp` executable
                  const child = spawn('gulp', tasks)
                  
                  // Print output from Gulpfile
                  child.stdout.on('data', function(data) {
                      if (data) console.log(data.toString())
                  })
                  

                  咕嚕咕嚕

                  雖然使用 gulp-chug 是解決此問題的一種方法,但 它已被 gulp 的維護(hù)者列入黑名單 因?yàn)?..

                  gulp-chug

                  Although using gulp-chug is one way to go about this, it has been blacklisted by gulp's maintainers for being...

                  執(zhí)行,太復(fù)雜,只是將 gulp 用作 globber"

                  "execing, too complex and is just using gulp as a globber"

                  官方黑名單聲明...

                  沒有理由存在,使用 require-all 模塊或節(jié)點(diǎn)的 require"

                  "no reason for this to exist, use the require-all module or node's require"

                  這篇關(guān)于從一個(gè) gulpfile.js 從另一個(gè) gulpfile.js 運(yùn)行 gulp 任務(wù)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來(lá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 崩潰)
                    • <bdo id='Podhr'></bdo><ul id='Podhr'></ul>
                    • <legend id='Podhr'><style id='Podhr'><dir id='Podhr'><q id='Podhr'></q></dir></style></legend>

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

                          <tfoot id='Podhr'></tfoot>

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

                              <tbody id='Podhr'></tbody>
                            主站蜘蛛池模板: 欧美午夜一区 | 99国内精品久久久久久久 | 国产真实乱对白精彩久久小说 | 黄色网址大全在线观看 | 欧美一区二区在线看 | 欧美成人激情 | 午夜久久久久久久久久一区二区 | 久久中文字幕一区 | 久久一二区 | 激情五月婷婷 | 中文字幕在线国产 | 久久免费精品视频 | 91在线视频网址 | 秋霞电影一区二区三区 | 久久久久国产一区二区三区四区 | 福利在线看 | 日本久久网 | 亚洲国产成人久久久 | 91视频一区 | 欧美欧美欧美 | 精品一区二区三区入口 | 羞视频在线观看 | 国产精品性做久久久久久 | 一级a性色生活片久久毛片波多野 | 久久三区| 中文字幕在线观看视频一区 | 亚洲精品一区二区三区中文字幕 | 一区二区三区视频在线观看 | 欧美视频网| 国产免费一区二区三区网站免费 | 国产精品美女一区二区 | 欧美一区二区三区在线观看视频 | 欧美日韩免费视频 | 龙珠z在线观看 | 成人在线免费网站 | 欧美一级全黄 | 国产精品一区二区福利视频 | 久草视频网站 | 国产精品99| 精精国产xxxx视频在线播放 | 日本黄色片免费在线观看 |