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

      <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="qwawimqqmiuu" id='86pgR'><tfoot id='86pgR'></tfoot><dl id='86pgR'><fieldset id='86pgR'></fieldset></dl></div>
    3. 當 gulp-jshint 失敗時,無法使 gulp-notify 彈出錯誤消

      Cant make gulp-notify to pop up a error message when gulp-jshint fail(當 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="qwawimqqmiuu" 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>
                本文介紹了當 gulp-jshint 失敗時,無法使 gulp-notify 彈出錯誤消息的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                限時送ChatGPT賬號..

                所以,我們整天都在研究新的 FE 工作流程,主要想法是通過觀察者運行一些任務,我們將擁有我們的 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 任務示例:

                Example for our sass task when fail:

                對于我們的樣式任務,一切正常,但我無法為 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 文件,如果失敗,彈出窗口,當你看到這個時,你進入控制臺,你會看到 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í)行更多的任務,比如borwserify,所以重要的是如果它停止了,等待"直到我完成修復然后繼續(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'}));
                  });
                

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

                <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="qwawimqqmiuu" 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>
                          主站蜘蛛池模板: 在线一区二区三区 | 久久亚洲美女 | 亚洲精品在线免费观看视频 | 第一福利社区1024 | 久久久精品影院 | 毛片一级网站 | 亚洲综合第一页 | 久久久精彩视频 | 亚洲精品在线观看视频 | 人操人免费视频 | 成人黄色电影在线观看 | 国产日韩欧美中文 | 毛片软件 | 国产免费视频在线 | 岛国毛片 | www.国产一区 | 欧美精品一区二区三区在线播放 | 极品一区 | 欧美一级大片 | 亚洲精品九九 | 欧美一区二区三区在线视频 | 国产视频线观看永久免费 | 精品欧美乱码久久久久久1区2区 | 中文字幕 在线观看 | 日韩av手机在线观看 | 欧美日韩免费一区二区三区 | 日韩a视频 | 久久精品国产久精国产 | 国产一区二区在线播放视频 | 亚洲高清视频一区 | 日韩第一页| 精品视频一区二区三区 | 亚洲国产成人av好男人在线观看 | jizjizjiz中国护士18 | 亚洲成人网在线 | 久久免费看 | 91免费看片 | 欧美一级黄色片在线观看 | 91视在线国内在线播放酒店 | 欧美一区久久 | 日本精品一区二区三区在线观看视频 |