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

      <bdo id='86pgR'></bdo><ul id='86pgR'></ul>

    <small id='86pgR'></small><noframes id='86pgR'>

    1. <legend id='86pgR'><style id='86pgR'><dir id='86pgR'><q id='86pgR'></q></dir></style></legend>
    2. <tfoot id='86pgR'></tfoot>

      <i id='86pgR'><tr id='86pgR'><dt id='86pgR'><q id='86pgR'><span id='86pgR'><b id='86pgR'><form id='86pgR'><ins id='86pgR'></ins><ul id='86pgR'></ul><sub id='86pgR'></sub></form><legend id='86pgR'></legend><bdo id='86pgR'><pre id='86pgR'><center id='86pgR'></center></pre></bdo></b><th id='86pgR'></th></span></q></dt></tr></i><div class="5p7thvl" id='86pgR'><tfoot id='86pgR'></tfoot><dl id='86pgR'><fieldset id='86pgR'></fieldset></dl></div>
    3. 當(dāng) gulp-jshint 失敗時,無法使 gulp-notify 彈出錯誤消

      Cant make gulp-notify to pop up a error message when gulp-jshint fail(當(dāng) gulp-jshint 失敗時,無法使 gulp-notify 彈出錯誤消息)

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

              <legend id='kpgkX'><style id='kpgkX'><dir id='kpgkX'><q id='kpgkX'></q></dir></style></legend>
            • <small id='kpgkX'></small><noframes id='kpgkX'>

                <tbody id='kpgkX'></tbody>
                <bdo id='kpgkX'></bdo><ul id='kpgkX'></ul>
                本文介紹了當(dāng) gulp-jshint 失敗時,無法使 gulp-notify 彈出錯誤消息的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                限時送ChatGPT賬號..

                所以,我們整天都在研究新的 FE 工作流程,主要想法是通過觀察者運行一些任務(wù),我們將擁有我們的 IDE 和一個窗口,每次發(fā)生變化時都會刷新瀏覽器(scss、js, html 等).

                So, was the whole day working on our new FE workflow, the main idea is to run a few tasks through a watcher, we will have our IDE's and a window with the browsers getting refreshed each time something change (scss, js, html, etc).

                因此,如果一切順利,我們將什么也看不到:瀏覽器將重新加載,我們將繼續(xù)工作.

                So, we wont see nothing if all went good: the browser will get reload and we will keep working.

                但是,我們想使用 gulp notify 來處理錯誤,所以萬一我們有問題,會彈出通知程序,此時您可以檢查控制臺并查看錯誤.

                But, we want to use gulp notify for errors, so in case we have something wrong, the notifier pop up will appear, and at that point, you can check the console and see the error.

                失敗時的 sass 任務(wù)示例:

                Example for our sass task when fail:

                對于我們的樣式任務(wù),一切正常,但我無法為 JS 文件完成此操作.

                For our styles tasks, everything works fine, but Im not able to accomplish this for JS files.

                主要是,我不能讓 gulp-jshint 像我想要的那樣工作.

                Mainly, I cant make gulp-jshint works as I want.

                這將是這樣的:你保存你的 js 文件,如果失敗,彈出窗口,當(dāng)你看到這個時,你進入控制臺,你會看到 jshint-stylish 的輸出.

                Which will be like this: you save your js file, if it fails, the popup appear and when you see this, you go to the console and you see the output of jshint-stylish.

                有人可以幫我嗎?

                這是我的(非工作)解決方案:

                This is my (non working) solution:

                gulp.task( 'js-hint', function() {
                    return gulp.src( config.source )
                        .pipe( plumber() )
                        .pipe( jshint( config.jsHintRules ) )
                        .pipe( jshint.reporter( 'jshint-stylish' ) )
                        .on('error', notify.onError( { message: 'JS hint fail' } ) );
                });
                

                顯然,我的概念有問題,所以,有人能幫我指明正確的方向嗎?

                Obviously, I have a problem with concepts, so, will somebody can please put me on the right direction ?

                請注意,我只想一直發(fā)出相同的消息JS提示失敗"

                Note that I just want to emit the same message all the time "JS hint fail"

                然后,控制臺(感謝 jshint-stylish)將為我們提供更多信息.

                Then, the console (thanks to jshint-stylish) will gave us more info.

                此外,這將在一個觀察者身上.JS提示通過后,會執(zhí)行更多的任務(wù),比如borwserify,所以重要的是如果它停止了,等待"直到我完成修復(fù)然后繼續(xù).

                Also, this will be on a watcher. After JS hint pass, will execute more tasks, like borwserify, so its important that if its stop, "wait" till I finish fixing it and then keep going.

                謝謝!

                PS,我正在使用:

                吞咽 3.8.10吞咽-jshint 1.8.6吞咽通知 2.0.1

                gulp 3.8.10 gulp-jshint 1.8.6 gulp-notify 2.0.1

                通過 OSX 10.9.4

                Over a OSX 10.9.4

                推薦答案

                gulp 中的 error 事件僅在流中發(fā)生錯誤時觸發(fā).

                The error event in gulp only fires when an error in the stream occurs.

                要將錯誤報告器添加到 gulp-jshint 將其傳遞給 fail 報告器:

                To add an error reporter to gulp-jshint pass it through the fail reporter:

                 gulp.task('js-hint', function() {
                      return gulp.src(config.source)
                        .pipe(plumber())
                        .pipe(jshint( config.jsHintRules))
                        .pipe(jshint.reporter('jshint-stylish'))
                        .pipe(jshint.reporter('fail'))
                        .on('error', notify.onError({ message: 'JS hint fail'}));
                  });
                

                這篇關(guān)于當(dāng) gulp-jshint 失敗時,無法使 gulp-notify 彈出錯誤消息的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 崩潰)

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

                  <tfoot id='Vtn4O'></tfoot>

                      <i id='Vtn4O'><tr id='Vtn4O'><dt id='Vtn4O'><q id='Vtn4O'><span id='Vtn4O'><b id='Vtn4O'><form id='Vtn4O'><ins id='Vtn4O'></ins><ul id='Vtn4O'></ul><sub id='Vtn4O'></sub></form><legend id='Vtn4O'></legend><bdo id='Vtn4O'><pre id='Vtn4O'><center id='Vtn4O'></center></pre></bdo></b><th id='Vtn4O'></th></span></q></dt></tr></i><div class="b7zlflh" id='Vtn4O'><tfoot id='Vtn4O'></tfoot><dl id='Vtn4O'><fieldset id='Vtn4O'></fieldset></dl></div>
                        <tbody id='Vtn4O'></tbody>
                    1. <legend id='Vtn4O'><style id='Vtn4O'><dir id='Vtn4O'><q id='Vtn4O'></q></dir></style></legend>
                      • <bdo id='Vtn4O'></bdo><ul id='Vtn4O'></ul>
                          主站蜘蛛池模板: 精密模具制造,注塑加工,吹塑和吹瓶加工,EPS泡沫包装生产 - 济南兴田塑胶有限公司 | 暴风影音| 混合生育酚_醋酸生育酚粉_琥珀酸生育酚-山东新元素生物科技 | 杜康白酒加盟_杜康酒代理_杜康酒招商加盟官网_杜康酒厂加盟总代理—杜康酒神全国运营中心 | 武汉高低温试验箱_恒温恒湿试验箱厂家-武汉蓝锐环境科技有限公司 | 全国冰箱|空调|洗衣机|热水器|燃气灶维修服务平台-百修家电 | 济南冷库安装-山东冷库设计|建造|冷库维修-山东齐雪制冷设备有限公司 | 设计圈 - 让设计更有价值!| 衡阳耐适防护科技有限公司——威仕盾焊接防护用品官网/焊工手套/焊接防护服/皮革防护手套 | 光栅尺_Magnescale探规_磁栅尺_笔式位移传感器_苏州德美达 | 四探针电阻率测试仪-振实密度仪-粉末流动性测定仪-宁波瑞柯微智能 | 合肥触摸一体机_触摸查询机厂家_合肥拼接屏-安徽迅博智能科技 | 超声波清洗机_大型超声波清洗机_工业超声波清洗设备-洁盟清洗设备 | 便携式高压氧舱-微压氧舱-核生化洗消系统-公众洗消站-洗消帐篷-北京利盟救援 | 聚氨酯复合板保温板厂家_廊坊华宇创新科技有限公司 | 温控器生产厂家-提供温度开关/热保护器定制与批发-惠州市华恺威电子科技有限公司 | 深圳彩钢板_彩钢瓦_岩棉板_夹芯板_防火复合彩钢板_长鑫 | 碳化硅,氮化硅,冰晶石,绢云母,氟化铝,白刚玉,棕刚玉,石墨,铝粉,铁粉,金属硅粉,金属铝粉,氧化铝粉,硅微粉,蓝晶石,红柱石,莫来石,粉煤灰,三聚磷酸钠,六偏磷酸钠,硫酸镁-皓泉新材料 | 酶联免疫分析仪-多管旋涡混合仪|混合器-莱普特科学仪器(北京)有限公司 | 天津仓库出租网-天津电商仓库-天津云仓一件代发-【博程云仓】 | 酵素生产厂家_酵素OEM_酵素加盟_酵素ODM_酵素原料厂家_厦门益力康 | 厂房出租-厂房规划-食品技术-厂房设计-厂房装修-建筑施工-设备供应-设备求购-龙爪豆食品行业平台 | 河南膏药贴牌-膏药代加工-膏药oem厂家-洛阳今世康医药科技有限公司 | 高低温万能试验机-复合材料万能试验机-馥勒仪器 | 环球周刊网| 英国雷迪地下管线探测仪-雷迪RD8100管线仪-多功能数字听漏仪-北京迪瑞进创科技有限公司 | 柴油机_柴油发电机_厂家_品牌-江苏卡得城仕发动机有限公司 | 吉祥新世纪铝塑板_生产铝塑板厂家_铝塑板生产厂家_临沂市兴达铝塑装饰材料有限公司 | 焊接烟尘净化器__焊烟除尘设备_打磨工作台_喷漆废气治理设备 -催化燃烧设备 _天津路博蓝天环保科技有限公司 | 标策网-专注公司商业知识服务、助力企业发展 | 高柔性拖链电缆_卷筒电缆_耐磨耐折聚氨酯电缆-玖泰特种电缆 | 房在线-免费房产管理系统软件-二手房中介房屋房源管理系统软件 | 泰国试管婴儿_泰国第三代试管婴儿费用|成功率|医院—新生代海外医疗 | 百度爱采购运营研究社社群-店铺托管-爱采购代运营-良言多米网络公司 | 2025第九届世界无人机大会| 成都治疗尖锐湿疣比较好的医院-成都治疗尖锐湿疣那家医院好-成都西南皮肤病医院 | 政府园区专业委托招商平台_助力企业选址项目快速落地_东方龙商务集团 | 列管冷凝器,刮板蒸发器,外盘管反应釜厂家-无锡曼旺化工设备有限公司 | 哈尔滨治「失眠/抑郁/焦虑症/精神心理」专科医院排行榜-京科脑康免费咨询 一对一诊疗 | 外观设计_设备外观设计_外观设计公司_产品外观设计_机械设备外观设计_东莞工业设计公司-意品深蓝 | 液压升降货梯_导轨式升降货梯厂家_升降货梯厂家-河南东圣升降设备有限公司 |