pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    • <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="s0ugwaq" id='WQKD3'><tfoot id='WQKD3'></tfoot><dl id='WQKD3'><fieldset id='WQKD3'></fieldset></dl></div>
        <tfoot id='WQKD3'></tfoot>

        從一個 gulpfile.js 從另一個 gulpfile.js 運行 gulp 任務

        Running gulp task from one gulpfile.js from another gulpfile.js(從一個 gulpfile.js 從另一個 gulpfile.js 運行 gulp 任務)
        <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="2yy2us2" 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>
                  本文介紹了從一個 gulpfile.js 從另一個 gulpfile.js 運行 gulp 任務的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

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

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

                  1. 我有一個包含 gulpfile 的 component-a.它的一項任務(例如構建)構建組件并在 dist 文件夾中創建一個組合的 js 文件
                  2. 我有一個包含 gulpfile 的 component-b.它的一項任務(例如構建)構建組件并在 dist 文件夾中創建一個組合的 js 文件
                  3. 我有一個使用這兩個組件的項目.這個項目也有一個 gulpfile,我想在其中編寫一個任務:
                    • 從/components/component-a/gulpfile.js 執行構建任務
                    • 從/components/component-b/gulpfile.js 執行構建任務
                    • 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 執行構建任務.是否有可能或者我應該以其他方式處理這種情況?

                  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<從不同的目錄運行 Gulpfile 非常簡單/code> 模塊.

                  嘗試根據您的需要調整以下內容:

                  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 的維護者列入黑名單 因為...

                  gulp-chug

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

                  執行,太復雜,只是將 gulp 用作 globber"

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

                  官方黑名單聲明...

                  沒有理由存在,使用 require-all 模塊或節點的 require"

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

                  這篇關于從一個 gulpfile.js 從另一個 gulpfile.js 運行 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 崩潰)
                    • <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="8cs20ac" id='Podhr'><tfoot id='Podhr'></tfoot><dl id='Podhr'><fieldset id='Podhr'></fieldset></dl></div>

                              <tbody id='Podhr'></tbody>
                            主站蜘蛛池模板: 课件导航网_ppt课件_课件模板_课件下载_最新课件资源分享发布平台 | BAUER减速机|ROSSI-MERSEN熔断器-APTECH调压阀-上海爱泽工业设备有限公司 | COD分析仪|氨氮分析仪|总磷分析仪|总氮分析仪-圣湖Greatlake | 杜甫仪器官网|实验室平行反应器|升降水浴锅|台式低温循环泵 | 企业微信营销_企业微信服务商_私域流量运营_艾客SCRM官网 | 精雕机-火花机-精雕机 cnc-高速精雕机-电火花机-广东鼎拓机械科技有限公司 | 乐考网-银行从业_基金从业资格考试_初级/中级会计报名时间_中级经济师 | 垃圾处理设备_餐厨垃圾处理设备_厨余垃圾处理设备_果蔬垃圾处理设备-深圳市三盛环保科技有限公司 | 测试治具|过炉治具|过锡炉治具|工装夹具|测试夹具|允睿自动化设备 | 12cr1mov无缝钢管切割-15crmog无缝钢管切割-40cr无缝钢管切割-42crmo无缝钢管切割-Q345B无缝钢管切割-45#无缝钢管切割 - 聊城宽达钢管有限公司 | 吨袋包装机|吨包秤|吨包机|集装袋包装机-烟台华恩科技 | 成都顶呱呱信息技术有限公司-贷款_个人贷款_银行贷款在线申请 - 成都贷款公司 | 百度爱采购运营研究社社群-店铺托管-爱采购代运营-良言多米网络公司 | 浙江富广阀门有限公司| 工控机,嵌入式主板,工业主板,arm主板,图像采集卡,poe网卡,朗锐智科 | 河南彩印编织袋,郑州饲料编织袋定制,肥料编织袋加工厂-盛军塑业 河南凯邦机械制造有限公司 | 涡轮流量计_LWGY智能气体液体电池供电计量表-金湖凯铭仪表有限公司 | 黑龙江「京科脑康」医院-哈尔滨失眠医院_哈尔滨治疗抑郁症医院_哈尔滨精神心理医院 | 深圳离婚律师咨询「在线免费」华荣深圳婚姻律师事务所专办离婚纠纷案件 | 赛尔特智能移动阳光房-阳光房厂家-赛尔特建筑科技(广东)有限公司 | 优考试_免费在线考试系统_培训考试系统_题库系统_组卷答题系统_匡优考试 | 不锈钢复合板厂家_钛钢复合板批发_铜铝复合板供应-威海泓方金属复合材料股份有限公司 | 新疆系统集成_新疆系统集成公司_系统集成项目-新疆利成科技 | 沧州友城管业有限公司-内外涂塑钢管-大口径螺旋钢管-涂塑螺旋管-保温钢管生产厂家 | 卡诺亚轻高定官网_卧室系统_整家定制_定制家居_高端定制_全屋定制加盟_定制家具加盟_定制衣柜加盟 | SDG吸附剂,SDG酸气吸附剂,干式酸性气体吸收剂生产厂家,超过20年生产使用经验。 - 富莱尔环保设备公司(原名天津市武清县环保设备厂) | 齿轮减速机电机一体机_齿轮减速箱加电机一体化-德国BOSERL蜗轮蜗杆减速机电机生产厂家 | 玻璃钢板-玻璃钢防腐瓦-玻璃钢材料-广东壹诺 | 真丝围巾|真丝丝巾|羊绒围巾|围巾品牌|浙江越缇围巾厂家定制 | 防爆型气象站_农业气象站_校园气象站_农业四情监测系统「山东万象环境科技有限公司」 | 12cr1mov无缝钢管切割-15crmog无缝钢管切割-40cr无缝钢管切割-42crmo无缝钢管切割-Q345B无缝钢管切割-45#无缝钢管切割 - 聊城宽达钢管有限公司 | 作文导航网_作文之家_满分作文_优秀作文_作文大全_作文素材_最新作文分享发布平台 | 冷藏车-东风吸污车-纯电动环卫车-污水净化车-应急特勤保障车-程力专汽厂家-程力专用汽车股份有限公司销售二十一分公司 | 重庆小面培训_重庆小面技术培训学习班哪家好【终身免费复学】 | 真空搅拌机-行星搅拌机-双行星动力混合机-广州市番禺区源创化工设备厂 | 恒湿机_除湿加湿一体机_恒湿净化消毒一体机厂家-杭州英腾电器有限公司 | 欧美日韩国产一区二区三区不_久久久久国产精品无码不卡_亚洲欧洲美洲无码精品AV_精品一区美女视频_日韩黄色性爱一级视频_日本五十路人妻斩_国产99视频免费精品是看4_亚洲中文字幕无码一二三四区_国产小萍萍挤奶喷奶水_亚洲另类精品无码在线一区 | 合肥升降机-合肥升降货梯-安徽升降平台「厂家直销」-安徽鼎升自动化科技有限公司 | 无轨电动平车_轨道平车_蓄电池电动平车★尽在新乡百特智能转运设备有限公司 | 原子吸收设备-国产分光光度计-光谱分光光度计-上海光谱仪器有限公司 | 乐考网-银行从业_基金从业资格考试_初级/中级会计报名时间_中级经济师 |