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

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

    1. <tfoot id='vt8GM'></tfoot>

          <bdo id='vt8GM'></bdo><ul id='vt8GM'></ul>

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

      1. 是否可以在 es6 中編寫 gulpfile?

        Is it possible write a gulpfile in es6?(是否可以在 es6 中編寫 gulpfile?)
          <tbody id='h64WV'></tbody>
          <bdo id='h64WV'></bdo><ul id='h64WV'></ul>

            <tfoot id='h64WV'></tfoot>

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

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

          2. <legend id='h64WV'><style id='h64WV'><dir id='h64WV'><q id='h64WV'></q></dir></style></legend>

                  本文介紹了是否可以在 es6 中編寫 gulpfile?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  問題:如何在 ES6 中編寫我的 gulp 文件,以便我可以使用 import 而不是 require 并使用 => 語法優于 function()?

                  Question: How can I write my gulp file in ES6 so I can use import instead of require and use => syntax over function()?

                  我可以使用 io.js 或 node 任何版本.

                  gulpfile.js:

                  import gulp from "./node_modules/gulp/index.js";
                  gulp.task('hello-world', =>{
                      console.log('hello world');
                  });
                  

                  錯誤:

                  import gulp from "./node_modules/gulp/index.js";
                  ^^^^^^
                  SyntaxError: Unexpected reserved word
                  

                  <小時>

                  gulp.task('hello-world', =>{
                                           ^^
                  SyntaxError: Unexpected token =>
                  

                  node_modules/gulp/bin/gulp.js 內,我已按照要求將第一行更改為 #!/usr/bin/env node --harmony在這個 堆棧

                  Inside the node_modules/gulp/bin/gulp.js i've changed the first line to #!/usr/bin/env node --harmony as asked in this stack

                  推薦答案

                  是的,你可以使用 babel.

                  確保您擁有最新版本的 gulp-cli.

                  Make sure you've got the latest version of the gulp-cli.

                  npm install -g gulp-cli

                  安裝 babel 作為項目的依賴.

                  Install babel as a dependency of the project.

                  npm install --save-dev babel

                  gulpfile.js 重命名為 gulpfile.babel.js

                  您的 gulpfile 可能如下所示:

                  Your gulpfile might look something like this:

                  import gulp from 'gulp';
                  
                  gulp.task('default', () => {
                    // do something
                  });
                  

                  Babel 6.0+ 更新正如 Eric Bronniman 正確指出的那樣,要讓它與最新版本的 babel 一起工作,還需要一些額外的步驟.以下是這些說明:

                  Update for Babel 6.0+ As correctly pointed out by Eric Bronniman, there are a few extra steps involved in getting this to work with the latest version of babel. Here are those instructions:

                  再次確保您擁有最新版本的 gulp-cli
                  npm install -g gulp-cli

                  Again, make sure you've got the latest version of gulp-cli
                  npm install -g gulp-cli

                  然后安裝 gulp、babel core 和 es2015 預設
                  npm install --save-dev gulp babel-core babel-preset-es2015

                  Then install gulp, babel core, and the es2015 presets
                  npm install --save-dev gulp babel-core babel-preset-es2015

                  然后,將以下內容添加到 .babelrc 文件或 package.json 中

                  Then, either add the following to a .babelrc file or to your package.json

                  "babel": {
                    "presets": [
                      "es2015"
                    ]
                  }
                  

                  你的 gulpfile.js 應該命名為 gulpfile.babel.js

                  這篇關于是否可以在 es6 中編寫 gulpfile?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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='cGkk4'></tfoot>
                    <bdo id='cGkk4'></bdo><ul id='cGkk4'></ul>

                    • <legend id='cGkk4'><style id='cGkk4'><dir id='cGkk4'><q id='cGkk4'></q></dir></style></legend>
                        <tbody id='cGkk4'></tbody>

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

                            主站蜘蛛池模板: 国产精品高潮呻吟 | 超碰在线久 | 久久久久久一区 | 欧美精品第一页 | 日本免费黄色一级片 | 成人在线免费电影 | 国产国产精品 | 日韩精品在线观看一区二区三区 | 99riav国产一区二区三区 | 成人性生交大片免费看中文带字幕 | 国产 日韩 欧美 在线 | 999热精品 | 亚洲综合天堂网 | 我想看一级黄色毛片 | 午夜免费网 | 少妇一级淫片免费放播放 | 久久久影院 | 99在线免费观看 | 国产视频亚洲视频 | 日韩a在线 | 久久久久国产一区二区三区 | av黄色在线 | 国产成人精品免高潮在线观看 | 美女视频h | 久久久久久久久国产 | 国产精品乱码一二三区的特点 | 一区二区精品电影 | 日韩三级电影在线看 | 日韩爱爱网 | 麻豆国产一区二区三区四区 | 中文字幕av在线播放 | 国产japanhdxxxx麻豆 | 欧美一区二区三区的 | 一区二区三区小视频 | 在线观看成人精品 | 91九色porny首页最多播放 | 婷婷久久综合 | 日韩中文字幕一区 | 婷婷综合五月天 | 在线观看视频中文字幕 | 欧美亚洲国产一区 |