尊龙凯时人生就是博

ÁÄÁÄÔõôʹÓÃnpm×°ÖÃGithubÄ £¿é

Ëæ×ÅgithubµÄÊ¢ÐкÍʹÓã¬Ô½À´Ô½¶àµÄÈ˶¼×îÏÈʹÓÃËü¾ÙÐÐÏîÄ¿ÖÎÀíÒÔ¼°Ð­×÷¿ª·¢¡£npm (node package manager)ÊÇÒ»¸ö¼«ÆäÊ¢ÐÐµÄ javascript °ü¹ÜÀíÆ÷£¬ÈÃÎÒÃÇÄܹ»ÇáËɵع²ÏíºÍ×éÖ¯ÎÒÃǵĴúÂë¡£Òò´Ë£¬½«githubºÍnpmÍŽáʹÓ㬿ÉÒÔΪÎÒÃǵÄÏîÄ¿¿â´øÀ´¸ü¶àµÄ±ãµ±ÐԺͿɶ¨ÖÆ»¯¡£

ÈôÊÇÄúÏëÒª½«ÄúµÄGithub´úÂë¿âתÄð³ÉÒ»¸ö°ü£¬ÒÔ±ãÔÚÆäËûÏîÄ¿ÖÐÖظ´Ê¹Óã¬Ç¿ÁÒ½¨ÒéÄúʹÓÃNPM¡£ÓÉÓÚNPMÊÇÄ¿½ñ×îÊ¢ÐеÄJavaScriptÈí¼þ°ü¹ÜÀíÆ÷Ö®Ò»£¬Òò´Ë£¬½èÖúËü¿ÉÒÔÀû±ãµØ½«GithubÉϵĴúÂë¿âת»»ÎªÄ £¿é²¢ÔÚNPMÉÏÐû²¼¡£

±¾ÎĽ«ÏÈÈÝÔõÑùÔÚNPMÉÏ×°ÖÃGithubÄ £¿é¡£Çëƾ֤ÒÔÏ°취²Ù×÷£º

µÚÒ»²½£ºÔÚGithubÉϽ¨Éè²¢Ðû²¼ÄúµÄ´úÂë¿â

ÔÚÄúµÄGithubСÎÒ˽ÈËÕË»§Öн¨ÉèÒ»¸öеĴúÂë¿â£¬Ëæºó½«ÄúµÄ´úÂëÍÆË͵½¸Ã¿âÖС£

µÚ¶þ²½£ºÔÚÏÂÁîÐÐÖÐÔËÐÐnpm init

½øÈëÏÂÁîÐУ¬²¢ÔÚÏÂÁîÐÐÖÐÊäÈë¡°npm init¡±ÏÂÁî¡£Õ⽫Æô¶¯Ò»¸öÏòµ¼£¬Ö¸ÒýÄúÍê³É½¨ÉèÒ»¸öNode.jsÏîÄ¿µÄÀú³Ì¡£ÄúÐèÒªÊäÈëÄúÏîÄ¿µÄÃû³Æ¡¢ÐÎòÒÔ¼°°æ±¾µÈÐÅÏ¢¡£Ò»µ©ÄúÍê³ÉÁËÕâЩÐÅÏ¢µÄÌîд£¬¾Í»á×Ô¶¯ÌìÉúÒ»¸öpackage.jsonÎļþ£¬ÆäÖаüÀ¨ÏîÄ¿µÄËùÓÐÐÅÏ¢¡£

µÚÈý²½£º½«GithubÁ´½ÓÌí¼Óµ½package.jsonÎļþ

ÔÚpackage.jsonÎļþÖÐÕÒµ½¡°dependencies¡±×ֶΣ¬½«ÄúµÄGithub´úÂë¿âÁ´½ÓÌí¼Óµ½ÆäÖС£

{
  "name": "npm-github-install-examples",
  "version": "1.0.0",
  "description": "Demonstrates installing GitHub repos as NPM packages.",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
      "github-org/repo-name": "1.0.0"
  }
}

µÇ¼ºó¸´ÖÆ

ÔÚÕâÀïÎÒÌí¼ÓÁËÃûΪ”github-org/repo-name”µÄGithub´úÂë¿âÁ´½Ó£¬Æä°æ±¾Îª¡°1.0.0¡±¡£

µÚËIJ½£ºÔËÐÐnpm install

ÔÚÏÂÁîÐÐÖÐÊäÈë¡°npm install¡±ÏÂÁîÒÔ×°ÖÃÕâ¸öGithub´úÂë¿â¡£Õ⽫ÔÚÄúµÄÏîÄ¿ÖÐ×°ÖÃÃûΪ¡°github-org/repo-name¡±µÄÄ £¿é¡£

npm install

µÇ¼ºó¸´ÖÆ

ÏÖÔÚ£¬ÄúÒѾ­¿ÉÒÔʹÓÃÕâ¸ö´úÂë¿âÁË£¡

×ܽ᣺

ÎÒÃÇÒѾ­ÏêϸÏÈÈÝÁËÔõÑù½«Github´úÂë¿âת»»ÎªÄ £¿é£¬²¢ÇÒÏÈÈÝÁËÔõÑùÔÚNPMÉÏ×°ÖÃÕâ¸öÄ £¿é¡£ÔÚ½ñÌìµÄJavaScriptÌìÏÂÖУ¬GithubÒѾ­³ÉΪÁË¿ª·¢ÕßÃǹ²ÏíºÍЭ×÷¿ª·¢µÄÖ÷Ҫƽ̨£¬¶øNPMÔòÊÇÈÃÎÒÃÇÄܹ»¸üÀû±ãµØ·ÖÏíºÍ×éÖ¯ÎÒÃǵĴúÂë¡£ÒÔÊÇ£¬½«ÕâÁ½¸ö¹¤¾ßÍŽáʹÓý«ÎªÎÒÃÇ´øÀ´¸ü¶àµÄ±ãµ±ÐԺͿɶ¨ÖÆ»¯¡£

ÒÔÉϾÍÊÇÁÄÁÄÔõôʹÓÃnpm×°ÖÃGithubÄ £¿éµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是博ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是博ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是博

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ