{"id":965,"date":"2014-06-11T10:47:56","date_gmt":"2014-06-11T02:47:56","guid":{"rendered":"http:\/\/www.storagelab.org.cn\/zhangdi\/?p=965"},"modified":"2014-06-11T10:47:56","modified_gmt":"2014-06-11T02:47:56","slug":"bower%e7%9a%84%e5%ae%89%e8%a3%85%e4%b8%8e%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.divis.cn\/index.php\/2014\/06\/11\/bower%e7%9a%84%e5%ae%89%e8%a3%85%e4%b8%8e%e4%bd%bf%e7%94%a8\/","title":{"rendered":"bower\u7684\u5b89\u88c5\u4e0e\u4f7f\u7528"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" alt=\"\" src=\"http:\/\/blog.fens.me\/wp-content\/uploads\/2013\/08\/bower.png\" width=\"600\" height=\"400\" \/><\/p>\n<p>\u73b0\u5728github\u4e0a\u5f88\u591a\u4f8b\u7a0b\u90fd\u4f7f\u7528bower\u6765\u7ba1\u7406\u524d\u7aef\u7684\u901a\u7528\u4f9d\u8d56\u5e93\uff0c\u6bd4\u5982jquery, bootstarp, angularjs\u7b49\u7b49\u3002<\/p>\n<h2>bower\u7684\u5b89\u88c5<\/h2>\n<p>\u9996\u5148\u786e\u5b9a\u4f60\u7684\u7cfb\u7edf\u5b89\u88c5\u4e86nodejs\u3002\u4e4b\u540e\u5c31\u53ef\u4ee5\u7528npm\u5305\u7ba1\u7406\u5de5\u5177\u4e0b\u8f7d\u5e76\u5168\u5c40\u5b89\u88c5bower:<br \/>\n&gt; npm install -g bower<\/p>\n<p>\u5168\u5c40\u5b89\u88c5Bower\u540e\uff0c\u53ef\u4ee5\u67e5\u770bBower\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u4f7f\u7528\u547d\u4ee4\uff1a<br \/>\n&gt; bower help<\/p>\n<h2>bower\u7684\u4f7f\u7528<\/h2>\n<p>\u4f7f\u7528\u4e86bower\u7684\u9879\u76ee\u90fd\u4f1a\u5728\u76ee\u5f55\u4e0b\u6709\u4e00\u4e2abower.json\u6587\u4ef6\u3002\u5728\u8be5\u6587\u4ef6\u540c\u7ea7\u76ee\u5f55\u4e0b\uff0c\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u5373\u53ef\u5b89\u88c5\u76f8\u5173\u4f9d\u8d56\u5e93\u3002<\/p>\n<p>&gt; bower install<\/p>\n<blockquote><p>\u6ce8\uff1abower\u4e0b\u8f7d\u5b89\u88c5\u4f9d\u8d56\u5e93\u5b9e\u9645\u4e0a\u662f\u4f7f\u7528git\u8fdb\u884c\u4e0b\u8f7d\u3002\u5bf9\u4e8elinux\u7cfb\u7edf\uff0c\u7531\u4e8e\u9ed8\u8ba4\u90fd\u6709\u5b89\u88c5git\uff0c\u6240\u4ee5\u4e00\u822c\u6ca1\u95ee\u9898\u3002\u4f46\u662fwindows\u7cfb\u7edf\u4e00\u822c\u6ca1\u6709git\u3002\u5728windows\u7cfb\u7edf\u4e0b\u9700\u8981\u786e\u5b9a\u5b89\u88c5\u4e86git\u5ba2\u6237\u7aef\uff0c\u5efa\u8bae\u4f7f\u7528\u540c\u6346\u7684git bash\u547d\u4ee4\u884c\u6765\u6267\u884cbower install\u547d\u4ee4\u3002\u6216\u8005\u628agit\u76ee\u5f55\u52a0\u5165windows\u7684\u73af\u5883\u53d8\u91cf\u4e2d\uff0c\u518d\u5728\u547d\u4ee4\u884c\u4e2d\u6267\u884cbower install\u547d\u4ee4\u3002<\/p><\/blockquote>\n<p>\u4f7f\u7528bower\u5b89\u88c5\u67d0\u4e2a\u7279\u5b9a\u7c7b\u5e93\uff0c\u4f8b\u5982jquery:<\/p>\n<p>&gt;\u00a0bower install jquery<\/p>\n<p>\u4f7f\u7528bower\u66f4\u65b0\u67d0\u4e2a\u7279\u5b9a\u7c7b\u5e93\uff0c\u4f8b\u5982jquery:<\/p>\n<p>&gt;bower update jquery<\/p>\n<p>\u5220\u9664\u5305,\u4f8b\u5982jquery (\u5982\u679c\u5305\u5df2\u7ecf\u88ab\u4f9d\u8d56\uff0c\u5219\u4e0d\u80fd\u5220\u9664)<\/p>\n<p>&gt;bower uninstall jquery<\/p>\n<p>\u66f4\u591a\u7684\u547d\u4ee4\u8bf7\u7528help\u67e5\u770b\u3002<\/p>\n<p>&gt;bower help<\/p>\n<p>\u66f4\u591a\u7684\u53c2\u8003\uff1a<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"beRNXj5REQ\"><p><a href=\"http:\/\/blog.fens.me\/nodejs-bower-intro\/\">bower\u89e3\u51b3js\u7684\u4f9d\u8d56\u7ba1\u7406<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;bower\u89e3\u51b3js\u7684\u4f9d\u8d56\u7ba1\u7406&#8221; &#8212; \u7c89\u4e1d\u65e5\u5fd7\" src=\"http:\/\/blog.fens.me\/nodejs-bower-intro\/embed\/#?secret=beRNXj5REQ\" data-secret=\"beRNXj5REQ\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<h2>bower\u7684\u91ce\u671b<\/h2>\n<p>\u5305\u7ba1\u7406\u662f\u4e2a\u590d\u6742\u7684\u95ee\u9898\uff0c\u6211\u4eec\u8981\u77e5\u9053\u8c01\u4f9d\u8d56\u8c01\uff0c\u8fd8\u8981\u660e\u786e\u54ea\u4e2a\u7248\u672c\u4f9d\u8d56\u54ea\u4e2a\u7248\u672c\u3002\u8fd9\u4e9b\u5bf9\u4e8e\u5f00\u53d1\u4eba\u5458\u6765\u8bf4\uff0c\u8d1f\u62c5\u8fc7\u91cd\u4e86\u3002bower\u4f5c\u4e3a\u4e00\u4e2ajs\u4f9d\u8d56\u7ba1\u7406\u7684\u5de5\u5177\uff0c\u63d0\u4f9b\u4e00\u79cd\u7406\u60f3\u5305\u7ba1\u7406\u65b9\u5f0f\uff0c\u501f\u52a9\u4e86npm\u7684\u4e00\u4e9b\u601d\u60f3\uff0c\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e00\u4e2a\u8212\u670d\u7684\u5f00\u53d1\u73af\u5883\u3002<\/p>\n<p>bower\u867d\u7136\u73b0\u5728\u770b\u8d77\u6765\u53ea\u662f\u4e00\u4e2a\u524d\u7aef\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u5b9e\u9645\u4e0a\u5176\u76ee\u6807\u662fcommonJS\u89c4\u8303\u7684\u4e00\u90e8\u5206\uff0c\u5373\u6700\u7ec8\u7ed9javascript\u63d0\u4f9b\u4e00\u4e2a\u7c7b\u4f3cruby, python\uff0cjava\u90a3\u6837\u7684\u6807\u51c6\u5316\u7c7b\u5e93\uff0c\u4e00\u5207\u4f9d\u8d56\u90fd\u53ef\u4ee5\u8fdc\u7a0b\u52a0\u8f7d\uff0c\u4f7f\u5f97\u9879\u76ee\u4e0d\u5b58\u5728\u7cfb\u7edf\u7ea7\u7684\u4f9d\u8d56\uff0c\u4e0d\u540c\u7684\u5e94\u7528\u7a0b\u5e8f\u95f4\u4e5f\u4e0d\u4f1a\u5171\u4eab\u4f9d\u8d56\uff0c\u4f7f\u5f97\u6574\u4e2a\u4f9d\u8d56\u6811\u6241\u5e73\u6613\u4fee\u6539\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u73b0\u5728github\u4e0a\u5f88\u591a\u4f8b\u7a0b\u90fd\u4f7f\u7528bowe<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[78],"class_list":["post-965","post","type-post","status-publish","format-standard","hentry","category-web-frontend","tag-78"],"_links":{"self":[{"href":"https:\/\/www.divis.cn\/index.php\/wp-json\/wp\/v2\/posts\/965","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.divis.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.divis.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.divis.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.divis.cn\/index.php\/wp-json\/wp\/v2\/comments?post=965"}],"version-history":[{"count":0,"href":"https:\/\/www.divis.cn\/index.php\/wp-json\/wp\/v2\/posts\/965\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.divis.cn\/index.php\/wp-json\/wp\/v2\/media?parent=965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.divis.cn\/index.php\/wp-json\/wp\/v2\/categories?post=965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.divis.cn\/index.php\/wp-json\/wp\/v2\/tags?post=965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}