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

    • <bdo id='oXyst'></bdo><ul id='oXyst'></ul>

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

        <legend id='oXyst'><style id='oXyst'><dir id='oXyst'><q id='oXyst'></q></dir></style></legend>
      1. <small id='oXyst'></small><noframes id='oXyst'>

        為什么我們需要在全局和本地安裝 gulp?

        Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
            <tbody id='rSPgS'></tbody>
          <legend id='rSPgS'><style id='rSPgS'><dir id='rSPgS'><q id='rSPgS'></q></dir></style></legend>
            • <bdo id='rSPgS'></bdo><ul id='rSPgS'></ul>

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

                • <i id='rSPgS'><tr id='rSPgS'><dt id='rSPgS'><q id='rSPgS'><span id='rSPgS'><b id='rSPgS'><form id='rSPgS'><ins id='rSPgS'></ins><ul id='rSPgS'></ul><sub id='rSPgS'></sub></form><legend id='rSPgS'></legend><bdo id='rSPgS'><pre id='rSPgS'><center id='rSPgS'></center></pre></bdo></b><th id='rSPgS'></th></span></q></dt></tr></i><div class="lbrdlzp" id='rSPgS'><tfoot id='rSPgS'></tfoot><dl id='rSPgS'><fieldset id='rSPgS'></fieldset></dl></div>
                  <tfoot id='rSPgS'></tfoot>
                  本文介紹了為什么我們需要在全局和本地安裝 gulp?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  2 個關于 gulp 的手冊說我需要先全局安裝 gulp(使用 -g 標志),然后再安裝一個當?shù)貢r間.為什么我需要這個?

                  2 manuals about gulp say that I need to install gulp first globally (with -g flag) and then one more time locally. Why do I need this?

                  推薦答案

                  在全局安裝工具時,用戶可以在任何地方將其用作命令行實用程序,包括節(jié)點項目之外.節(jié)點項目的全局安裝不好,因為它們使部署更加困難.

                  When installing a tool globally it's to be used by a user as a command line utility anywhere, including outside of node projects. Global installs for a node project are bad because they make deployment more difficult.

                  npxnpm 5.2 捆綁在一起的實用程序解決了這個問題.使用它,您可以調用本地安裝的實用程序,如全局安裝的實用程序(但您必須以 npx 開頭命令).例如,如果你想調用一個本地安裝的 eslint,你可以這樣做:

                  The npx utility bundled with npm 5.2 solves this problem. With it you can invoke locally installed utilities like globally installed utilities (but you must begin the command with npx). For example, if you want to invoke a locally installed eslint, you can do:

                  npx eslint .
                  

                  npm

                  5.2

                  當在 package.json 的 script 字段中使用時,npm 會在 node_modules 中搜索工具以及全局安裝的模塊,因此本地安裝就足夠了.

                  npm < 5.2

                  When used in a script field of your package.json, npm searches node_modules for the tool as well as globally installed modules, so the local install is sufficient.

                  所以,如果您對(在您的 package.json 中)感到滿意:

                  So, if you are happy with (in your package.json):

                  "devDependencies": {
                      "gulp": "3.5.2"
                  }
                  "scripts": {
                      "test": "gulp test"
                  }
                  

                  等等.并使用 npm run test 運行,那么您根本不需要全局安裝.

                  etc. and running with npm run test then you shouldn't need the global install at all.

                  這兩種方法對于讓人們設置您的項目很有用,因為不需要 sudo.這也意味著 gulp 將在 package.json 中的版本發(fā)生碰撞時更新,因此每個人在使用您的項目開發(fā)時都將使用相同版本的 gulp.

                  Both methods are useful for getting people set up with your project since sudo isn't needed. It also means that gulp will be updated when the version is bumped in the package.json, so everyone will be using the same version of gulp when developing with your project.

                  gulp 在全局使用時似乎有一些不尋常的行為.當用作全局安裝時,gulp 會查找本地安裝的 gulp 以傳遞控制權.因此,gulp 全局安裝需要 gulp 本地安裝才能工作.上面的答案仍然有效.本地安裝總是優(yōu)于全局安裝.

                  It appears that gulp has some unusual behaviour when used globally. When used as a global install, gulp looks for a locally installed gulp to pass control to. Therefore a gulp global install requires a gulp local install to work. The answer above still stands though. Local installs are always preferable to global installs.

                  這篇關于為什么我們需要在全局和本地安裝 gulp?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(liá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 以使其以不同的方式運行任務?)
                  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 崩潰)
                  Detect FLASH plugin crashes(檢測 FLASH 插件崩潰)
                    <bdo id='CWxNw'></bdo><ul id='CWxNw'></ul>
                    <i id='CWxNw'><tr id='CWxNw'><dt id='CWxNw'><q id='CWxNw'><span id='CWxNw'><b id='CWxNw'><form id='CWxNw'><ins id='CWxNw'></ins><ul id='CWxNw'></ul><sub id='CWxNw'></sub></form><legend id='CWxNw'></legend><bdo id='CWxNw'><pre id='CWxNw'><center id='CWxNw'></center></pre></bdo></b><th id='CWxNw'></th></span></q></dt></tr></i><div class="xd7brfn" id='CWxNw'><tfoot id='CWxNw'></tfoot><dl id='CWxNw'><fieldset id='CWxNw'></fieldset></dl></div>

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

                  • <small id='CWxNw'></small><noframes id='CWxNw'>

                          <tbody id='CWxNw'></tbody>

                            <tfoot id='CWxNw'></tfoot>
                            主站蜘蛛池模板: 酒瓶_酒杯_玻璃瓶生产厂家_徐州明政玻璃制品有限公司 | 标准件-非标紧固件-不锈钢螺栓-非标不锈钢螺丝-非标螺母厂家-三角牙锁紧自攻-南京宝宇标准件有限公司 | 方源木业官网-四川木门-全国木门专业品牌 | 济南保安公司加盟挂靠-亮剑国际安保服务集团总部-山东保安公司|济南保安培训学校 | 粘度计NDJ-5S,粘度计NDJ-8S,越平水分测定仪-上海右一仪器有限公司 | 整合营销推广|营销网络推广公司|石家庄网站优化推广公司|智营销 好物生环保网、环保论坛 - 环保人的学习交流平台 | 天津暖气片厂家_钢制散热器_天津铜铝复合暖气片_维尼罗散热器 | bkzzy在职研究生网 - 在职研究生招生信息咨询平台 | 杰恒蠕动泵-蠕动泵专业厂家-19年专注蠕动泵 | 西安标准厂房_陕西工业厂房_西咸新区独栋厂房_长信科技产业园官方网站 | 纯水设备_苏州皙全超纯水设备水处理设备生产厂家 | 动库网动库商城-体育用品专卖店:羽毛球,乒乓球拍,网球,户外装备,运动鞋,运动包,运动服饰专卖店-正品运动品网上商城动库商城网 - 动库商城 | TPU薄膜_TPU薄膜生产厂家_TPU热熔胶膜厂家定制_鑫亘环保科技(深圳)有限公司 | 细胞染色-流式双标-试剂盒免费代做-上海研谨生物科技有限公司 | 沟盖板_复合沟盖板厂_电力盖板_树脂雨水篦子-淄博拜斯特 | 广州昊至泉水上乐园设备有限公司 | 深圳市宏康仪器科技有限公司-模拟高空低压试验箱-高温防爆试验箱-温控短路试验箱【官网】 | 河北中仪伟创试验仪器有限公司是专业生产沥青,土工,水泥,混凝土等试验仪器的厂家,咨询电话:13373070969 | 拉力机-万能试验机-材料拉伸试验机-电子拉力机-拉力试验机厂家-冲击试验机-苏州皖仪实验仪器有限公司 | 郑州巴特熔体泵有限公司专业的熔体泵,熔体齿轮泵与换网器生产厂家 | 体视显微镜_荧光生物显微镜_显微镜报价-微仪光电生命科学显微镜有限公司 | 螺杆真空泵_耐腐蚀螺杆真空泵_水环真空泵_真空机组_烟台真空泵-烟台斯凯威真空 | 电机保护器-电动机综合保护器-浙江开民| 橡胶接头_橡胶软接头_可曲挠橡胶接头-巩义市创伟机械制造有限公司 | 土壤有机碳消解器-石油|表层油类分析采水器-青岛溯源环保设备有限公司 | 整合营销推广|营销网络推广公司|石家庄网站优化推广公司|智营销 好物生环保网、环保论坛 - 环保人的学习交流平台 | 整车VOC采样环境舱-甲醛VOC预处理舱-多舱法VOC检测环境仓-上海科绿特科技仪器有限公司 | STRO|DTRO-STRO反渗透膜(科普)_碟滤 | 产业规划_产业园区规划-产业投资选址及规划招商托管一体化服务商-中机院产业园区规划网 | 洛阳网站建设_洛阳网站优化_网站建设平台_洛阳香河网络科技有限公司 | 中高频感应加热设备|高频淬火设备|超音频感应加热电源|不锈钢管光亮退火机|真空管烤消设备 - 郑州蓝硕工业炉设备有限公司 | 专业深孔加工_东莞深孔钻加工_东莞深孔钻_东莞深孔加工_模具深孔钻加工厂-东莞市超耀实业有限公司 | 蓄电池在线监测系统|SF6在线监控泄露报警系统-武汉中电通电力设备有限公司 | PCB厂|线路板厂|深圳线路板厂|软硬结合板厂|电路板生产厂家|线路板|深圳电路板厂家|铝基板厂家|深联电路-专业生产PCB研发制造 | 杭州ROHS检测仪-XRF测试仪价格-百科| 安徽合肥格力空调专卖店_格力中央空调_格力空调总经销公司代理-皖格制冷设备 | 螺旋丝杆升降机-SWL蜗轮-滚珠丝杆升降机厂家-山东明泰传动机械有限公司 | 游泳池设备安装工程_恒温泳池设备_儿童游泳池设备厂家_游泳池水处理设备-东莞市君达泳池设备有限公司 | 石家庄装修设计_室内家装设计_别墅装饰装修公司-石家庄金舍装饰官网 | 技德应用| 塑料薄膜_PP薄膜_聚乙烯薄膜-常州市鑫美新材料包装厂 |