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

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

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

                  問題描述

                  限時送ChatGPT賬號..

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

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

                  1. 我有一個包含 gulpfile 的 component-a.它的一項任務(wù)(例如構(gòu)建)構(gòu)建組件并在 dist 文件夾中創(chuàng)建一個組合的 js 文件
                  2. 我有一個包含 gulpfile 的 component-b.它的一項任務(wù)(例如構(gòu)建)構(gòu)建組件并在 dist 文件夾中創(chuàng)建一個組合的 js 文件
                  3. 我有一個使用這兩個組件的項目.這個項目也有一個 gulpfile,我想在其中編寫一個任務(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<從不同的目錄運行 Gulpfile 非常簡單/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 的維護者列入黑名單 因為...

                  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é)點的 require"

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

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

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

                  相關(guān)文檔推薦

                  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 以使其以不同的方式運行任務(wù)?)
                  Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
                  How to run Gulp tasks sequentially one after the other(如何一個接一個地依次運行 Gulp 任務(wù))
                  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="o02keqe" id='Podhr'><tfoot id='Podhr'></tfoot><dl id='Podhr'><fieldset id='Podhr'></fieldset></dl></div>

                              <tbody id='Podhr'></tbody>
                            主站蜘蛛池模板: 开锐教育-学历提升-职称评定-职业资格培训-积分入户 | 手持式浮游菌采样器-全排二级生物安全柜-浙江孚夏医疗科技有限公司 | 注塑机-压铸机-塑料注塑机-卧式注塑机-高速注塑机-单缸注塑机厂家-广东联升精密智能装备科技有限公司 | 流量检测仪-气密性检测装置-密封性试验仪-东莞市奥图自动化科技有限公司 | 吊篮式|移动式冷热冲击试验箱-二槽冷热冲击试验箱-广东科宝 | 安徽合肥格力空调专卖店_格力中央空调_格力空调总经销公司代理-皖格制冷设备 | 网带通过式抛丸机,,网带式打砂机,吊钩式,抛丸机,中山抛丸机生产厂家,江门抛丸机,佛山吊钩式,东莞抛丸机,中山市泰达自动化设备有限公司 | 化工ERP软件_化工新材料ERP系统_化工新材料MES软件_MES系统-广东顺景软件科技有限公司 | 塑钢课桌椅、学生课桌椅、课桌椅厂家-学仕教育设备首页 | IP检测-检测您的IP质量| 合肥宠物店装修_合肥宠物美容院装修_合肥宠物医院设计装修公司-安徽盛世和居装饰 | 聚丙烯酰胺_厂家_价格-河南唐达净水材料有限公司 | 蜘蛛车-登高车-高空作业平台-高空作业车-曲臂剪叉式升降机租赁-重庆海克斯公司 | 桐城新闻网—桐城市融媒体中心主办| 窖井盖锯圆机_锯圆机金刚石锯片-无锡茂达金刚石有限公司 | 运动木地板厂家_体育木地板安装_篮球木地板选购_实木运动地板价格 | 软膜天花_软膜灯箱_首选乐创品牌_一站式天花软膜材料供应商! | 药品仓库用除湿机-变电站用防爆空调-油漆房用防爆空调-杭州特奥环保科技有限公司 | 防水套管厂家-柔性防水套管-不锈钢|刚性防水套管-天翔管道 | 蜘蛛车-登高车-高空作业平台-高空作业车-曲臂剪叉式升降机租赁-重庆海克斯公司 | 光环国际-新三板公司_股票代码:838504| 粉末包装机-给袋式包装机-全自动包装机-颗粒-液体-食品-酱腌菜包装机生产线【润立机械】 | 上海乾拓贸易有限公司-日本SMC电磁阀_德国FESTO电磁阀_德国FESTO气缸 | 高柔性拖链电缆-聚氨酯卷筒电缆-柔性屏蔽电缆厂家-玖泰电缆 | 慈溪麦田广告公司,提供慈溪广告设计。 | PC构件-PC预制构件-构件设计-建筑预制构件-PC构件厂-锦萧新材料科技(浙江)股份有限公司 | 不锈钢/气体/液体玻璃转子流量计(防腐,选型,规格)-常州天晟热工仪表有限公司【官网】 | HYDAC过滤器,HYDAC滤芯,现货ATOS油泵,ATOS比例阀-东莞市广联自动化科技有限公司 | 智慧食堂_食堂管理系统_食堂订餐_食堂消费系统—客易捷 | 明渠式紫外线杀菌器-紫外线消毒器厂家-定州市优威环保 | 气动|电动调节阀|球阀|蝶阀-自力式调节阀-上海渠工阀门管道工程有限公司 | atcc网站,sigma试剂价格,肿瘤细胞现货,人结肠癌细胞株购买-南京科佰生物 | 深圳市宏康仪器科技有限公司-模拟高空低压试验箱-高温防爆试验箱-温控短路试验箱【官网】 | 碎石机设备-欧版反击破-欧版颚式破碎机(站)厂家_山东奥凯诺机械 高低温试验箱-模拟高低温试验箱订制-北京普桑达仪器科技有限公司【官网】 | 浙江建筑资质代办_二级房建_市政_电力_安许_劳务资质办理公司 | 英国公司注册-新加坡公司注册-香港公司开户-离岸公司账户-杭州商标注册-杭州优创企业 | 天津拓展_天津团建_天津趣味运动会_天津活动策划公司-天津华天拓展培训中心 | 三效蒸发器_多效蒸发器价格_四效三效蒸发器厂家-青岛康景辉 | 银川美容培训-美睫美甲培训-彩妆纹绣培训-新娘化妆-学化妆-宁夏倍莱妮职业技能培训学校有限公司 临时厕所租赁_玻璃钢厕所租赁_蹲式|坐式厕所出租-北京慧海通 | 无锡不干胶标签,卷筒标签,无锡瑞彩包装材料有限公司 | 橡胶接头_橡胶软接头_可曲挠橡胶接头-巩义市创伟机械制造有限公司 |