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

  1. <legend id='lGYnz'><style id='lGYnz'><dir id='lGYnz'><q id='lGYnz'></q></dir></style></legend>

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

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

    3. console.log 到標準輸出的 gulp 事件

      console.log to stdout on gulp events(console.log 到標準輸出的 gulp 事件)

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

            <legend id='qCRBv'><style id='qCRBv'><dir id='qCRBv'><q id='qCRBv'></q></dir></style></legend>

                <bdo id='qCRBv'></bdo><ul id='qCRBv'></ul>
                  <tbody id='qCRBv'></tbody>
                <tfoot id='qCRBv'></tfoot>
              • 本文介紹了console.log 到標準輸出的 gulp 事件的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                限時送ChatGPT賬號..

                我想在 gulp 任務正在運行或已經運行時登錄到標準輸出(配置環境).

                I want to log to stdout (the config environment) when a gulp task is running or has run.

                類似這樣的:

                gulp.task('scripts', function () {
                  var enviroment = argv.env || 'development';
                  var config = gulp.src('config/' + enviroment + '.json')
                      .pipe(ngConstant({name: 'app.config'}));
                  var scripts = gulp.src('js/*');
                
                  return es.merge(config, scripts)
                    .pipe(concat('app.js'))
                    .pipe(gulp.dest('app/dist'))
                    .on('success', function() { 
                      console.log('Configured environment: ' + environment);
                    });
                });
                

                我不確定我應該響應什么事件或在哪里可以找到這些事件的列表.任何指針?非常感謝.

                I am not sure what event I should be responding to or where to find a list of these. Any pointers? Many thanks.

                推薦答案

                (2017 年 12 月,提供日志記錄的 gulp-util 模塊,已棄用.Gulp 團隊建議開發人員將此功能替換為 fancy-log 模塊.此答案已更新以反映這一點.)

                (In December 2017, the gulp-util module, which provided logging, was deprecated. The Gulp team recommended that developers replace this functionality with the fancy-log module. This answer has been updated to reflect that.)

                fancy-log 提供日志記錄,最初構建由 Gulp 團隊提供.

                fancy-log provides logging and was originally built by the Gulp team.

                var log = require('fancy-log');
                log('Hello world!');
                

                要添加日志記錄,Gulp 的 API 文檔告訴我們.src 返回:

                To add logging, Gulp's API documentation tell us that .src returns:

                返回可以通過管道傳輸到插件的 Vinyl 文件流.

                Returns a stream of Vinyl files that can be piped to plugins.

                Node.js 的 Stream 文檔提供了事件列表.放在一起,這里有一個例子:

                Node.js's Stream documentation provides a list of events. Put together, here's an example:

                gulp.task('default', function() {
                    return gulp.src('main.scss')
                        .pipe(sass({ style: 'expanded' }))
                        .on('end', function(){ log('Almost there...'); })
                        .pipe(minifycss())
                        .pipe(gulp.dest('.'))
                        .on('end', function(){ log('Done!'); });
                });
                

                注意:end 事件可能會在插件完成之前被調用(并且已經發送了它自己的所有輸出),因為當所有數據都已刷新到底層系統"時會調用該事件".

                Note: The end event may be called before the plugin is complete (and has sent all of its own output), because the event is called when "all data has been flushed to the underlying system".

                這篇關于console.log 到標準輸出的 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 崩潰)
                <tfoot id='Pfydf'></tfoot>

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

                            <tbody id='Pfydf'></tbody>

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

                          <legend id='Pfydf'><style id='Pfydf'><dir id='Pfydf'><q id='Pfydf'></q></dir></style></legend>
                          主站蜘蛛池模板: 亚洲天堂成人在线视频 | 午夜成人在线视频 | 欧美一区二区三区 | 成人亚洲视频 | 激情 婷婷 | 一区二区三区四区电影 | 久久久久久久久久久一区二区 | 国产精品一区二区三区免费观看 | 激情一区 | 免费视频一区二区 | 亚洲精品无人区 | 日本a级大片 | 这里有精品 | 一区中文字幕 | 91精品久久久久久久久久入口 | 二区高清 | 狠狠狠色丁香婷婷综合久久五月 | 成人午夜毛片 | 91亚洲国产亚洲国产 | 精品国产一区二区在线 | 伊人久久免费视频 | 欧美一级片在线观看 | 中文字幕av亚洲精品一部二部 | 国产一区在线免费观看 | 亚洲一区二区三区视频 | 精品久久久精品 | 超碰97干 | 中文字幕日本一区二区 | 久久九精品 | 精品香蕉一区二区三区 | 国产伦精品一区二区三区四区视频 | 欧美v在线观看 | 狠狠操在线 | 日本在线视频一区二区 | 精品久久不卡 | 久草视频观看 | 亚洲三区在线观看 | 999精品在线观看 | 国产亚洲一区二区三区在线观看 | 国产a区 | 欧美精品久久久 |