{"id":85456,"date":"2020-04-05T12:38:58","date_gmt":"2020-04-05T04:38:58","guid":{"rendered":"http:\/\/4563.org\/?p=85456"},"modified":"2020-04-05T12:38:58","modified_gmt":"2020-04-05T04:38:58","slug":"%e5%86%99%e4%ba%86%e4%b8%80%e4%b8%aa%e8%bd%bb%e9%87%8f%e7%ba%a7%e7%9a%84%e8%87%aa%e5%8a%a8%e6%9e%84%e5%bb%ba%e9%83%a8%e7%bd%b2-vscode-%e6%8f%92%e4%bb%b6","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=85456","title":{"rendered":"\u5199\u4e86\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u81ea\u52a8\u6784\u5efa\u90e8\u7f72 vscode \u63d2\u4ef6"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5199\u4e86\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u81ea\u52a8\u6784\u5efa\u90e8\u7f72 vscode \u63d2\u4ef6               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : CononYc <\/span>  <span><i><\/i> 8<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u76ee\u524d\u5df2\u7ecf\u53d1\u5e03\u5728 vscode \u7684\u63d2\u4ef6\u5e93\u4e2d\uff0c\u641c\u7d22 light-deploy \u5373\u53ef<\/p>\n<p>\u63d2\u4ef6\u652f\u6301\u7684 vscode \u7248\u672c\u76ee\u524d\u662f 1.44.0+\uff0c\u56e0\u4e3a\u662f\u57fa\u4e8e\u5fae\u8f6f\u6700\u65b0\u7684\u811a\u624b\u67b6\u5de5\u5177\u6253\u7684<\/p>\n<h2>\u6548\u679c\u56fe<\/h2>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200516_5ebfbc21d412c.png\" alt=\"\u5199\u4e86\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u81ea\u52a8\u6784\u5efa\u90e8\u7f72 vscode \u63d2\u4ef6\" \/><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200516_5ebfbc32390b3.png\" alt=\"\u5199\u4e86\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u81ea\u52a8\u6784\u5efa\u90e8\u7f72 vscode \u63d2\u4ef6\" \/><\/p>\n<h2>\u76ee\u524d\u652f\u6301\u7684\u529f\u80fd<\/h2>\n<ul>\n<li>\u81ea\u52a8\u6784\u5efa<\/li>\n<li>\u81ea\u52a8\u538b\u7f29\uff08\u538b\u7f29\u65b9\u5f0f tar.gz \uff09<\/li>\n<li>\u81ea\u52a8\u4e0a\u4f20\u670d\u52a1\u5668\u5907\u4efd<\/li>\n<li>\u81ea\u52a8\u53d1\u5e03<\/li>\n<\/ul>\n<h2>\u64cd\u4f5c\u6b65\u9aa4<\/h2>\n<ol>\n<li>\u914d\u7f6e setting.json<\/li>\n<li>\u5728\u5de6\u4fa7\u8d44\u6e90\u7ba1\u7406\u5668\u9009\u62e9\u5f00\u59cb\u7684\u8def\u5f84\uff0c\u53f3\u952e\u9009\u62e9<code>\u6267\u884c\u53d1\u5e03\uff08 light-deploy \uff09<\/code><\/li>\n<\/ol>\n<h2>\u914d\u7f6e\u8bf4\u660e<\/h2>\n<p>\u5b89\u88c5\u4e4b\u540e\u9700\u8981\u5728 setting.json \u91cc\u914d\u7f6e\uff0c\u4e5f\u53ef\u4ee5\u70b9\u51fb\u6587\u4ef6-&gt;\u9996\u9009\u9879-&gt;\u8bbe\u7f6e-&gt;\u6269\u5c55-&gt;Light-deploy \u8fdb\u884c\u914d\u7f6e \u76ee\u524d\u652f\u6301\u7684\u914d\u7f6e\u5982\u4e0b<\/p>\n<pre><code>\"light-deploy.config\": {       \/\/\u5f00\u542f\u7684\u914d\u7f6e\uff08\u548c name \u5bf9\u5e94\uff09       \"active\": \"dev\",       \"configuration\": [          {              \/\/\u914d\u7f6e\u540d\u79f0             \"name\": \"dev\",             \/\/\u670d\u52a1\u5668\u8fde\u63a5\u914d\u7f6e\uff08\u4f7f\u7528 node-ssh \uff09\u53ef\u4ee5\u4f7f\u7528\u516c\u79c1\u94a5\uff0c\u8be6\u7ec6\u914d\u7f6e\u53ef\u4ee5\u53c2\u770b node-ssh \u7684\u914d\u7f6e             \"ssh\": {                \"host\": \"172.16.5.33\",                \"port\": 22,                \"username\": \"root\",                \"password\": \"root\",             },             \/\/\u662f\u5426\u81ea\u52a8\u6784\u5efa             \"autoBuild\": true,             \/\/\u6784\u5efa\u914d\u7f6e             \"build\":{                 \/\/\u6267\u884c\u7684\u547d\u4ee4,\u9ed8\u8ba4\u662f npm run build                 \"cmd\":\"npm run build\",                 \/\/\u9ed8\u8ba4\u662f\u6784\u5efa\u8def\u5f84\uff0c\u5982\u914d\u7f6e\uff0c\u4f18\u4e8e\u6784\u5efa\u8def\u5f84                 \"path\":\"\"             },             \/\/\u662f\u5426\u81ea\u52a8\u538b\u7f29             \"autoCompress\": true,             \/\/\u662f\u5426\u81ea\u52a8\u5907\u4efd             \"autoBak\": true,             \/\/\u672c\u5730\u914d\u7f6e             \"local\": {                 \/\/\u6784\u5efa\u8f93\u51fa\u7684\u6587\u4ef6\u5939\uff0c\u76f8\u5bf9\u4e8e\u6784\u5efa\u8def\u5f84                \"buildOutDir\": \"dist\",                \/\/\u6784\u5efa\u8def\u5f84\uff0c\u53ef\u4e0d\u586b\uff0c\u9ed8\u8ba4\u662f\u53f3\u952e\u9009\u62e9\u7684\u5730\u5740\uff0c\u5982\u679c\u586b\u4e86\uff0c\u4f18\u4e8e\u53f3\u952e\u9009\u62e9\u5730\u5740                \"projectRootPath\":\"\",             },             \/\/\u8fdc\u7a0b\u914d\u7f6e             \"remote\": {                 \/\/\u5907\u4efd\u8def\u5f84                \"bakPath\": \"~\/bak\",                \/\/\u53d1\u5e03\u8def\u5f84                \"releasePath\": \"\/netty-socket\/web\",             }          }       ]    } <\/code><\/pre>\n<p>\u5173\u4e8e\u914d\u7f6e\u7684\u51e0\u9879\u8bf4\u660e<\/p>\n<ul>\n<li>\u6784\u5efa\u8def\u5f84\uff1a\u6784\u5efa\u5f00\u59cb\u7684\u8def\u5f84\uff0c\u53f3\u952e\u70b9\u51fb<code>\u6267\u884c\u53d1\u5e03\uff08 light-deploy \uff09<\/code>\u65f6\u7684\u8def\u5f84\uff0c\u4e5f\u53ef\u4ee5\u5728 build \u9009\u9879\u4e2d\u52a0\u5165\u914d\u7f6e projectRootPath\uff0c\u6b64\u914d\u7f6e\u4f18\u4e8e\u53f3\u952e\u9009\u62e9\u914d\u7f6e<\/li>\n<li>\u6587\u4ef6\u4e0a\u4f20\u4f4d\u7f6e\uff1a\u76ee\u524d\u9ed8\u8ba4\u662f linux \u767b\u5f55\u7528\u6237\u7684\u4e2a\u4eba\u6587\u4ef6\u5939\uff0c\u5373<code>~<\/code><\/li>\n<\/ul>\n<h2>\u5373\u5c06\u5b9e\u73b0<\/h2>\n<ul>\n<li>\u652f\u6301\u914d\u7f6e\u65e5\u671f\u683c\u5f0f\u5316<\/li>\n<li>\u652f\u6301\u914d\u7f6e\u81ea\u52a8\u5220\u9664\u672c\u5730 \/\u8fdc\u7a0b\u6784\u5efa\u6587\u4ef6<\/li>\n<li>\u652f\u6301\u5168\u5c40\u914d\u7f6e<\/li>\n<li>\u652f\u6301\u914d\u7f6e\u538b\u7f29\u65b9\u5f0f<\/li>\n<\/ul>\n<h2>\u5199\u5728\u6700\u540e<\/h2>\n<p>\u6700\u8fd1\u5199\u4e86\u4e00\u4e2a\u524d\u7aef\u9879\u76ee\uff0c\u82e6\u4e8e\u6bcf\u6b21\u90fd\u8981\u8fdb\u884c\u624b\u52a8\u53d1\u5e03\uff0c\u82e6\u5176\u4e45\u77e3\uff0c\u7f51\u4e0a\u627e\u4e86\u4e00\u4e9b\u63d2\u4ef6\u4e5f\u4e0d\u80fd\u6ee1\u8db3\u81ea\u5df1\u7684\u9700\u8981\uff0c\u524d\u6bb5\u65f6\u95f4\u770b\u4e86\u4e00\u7bc7\u57fa\u4e8e node \u7684\u6253\u5305\u6587\u7ae0\uff08\u6253\u9171\u6cb9 12138 \uff09\uff0c\u4f46\u662f\u89c9\u5f97\u8fd8\u4e0d\u591f\u65b9\u4fbf\uff0c\u4fbf\u60f3\u80fd\u4e0d\u80fd\u5199 vscode \u7684\u63d2\u4ef6\u6765\u5b9e\u73b0\uff0c\u9042\u53bb\u67e5\u4e86\u4e00\u4e0b vscode \u63d2\u4ef6\u7684\u5b9e\u73b0\u65b9\u5f0f\uff0c\u53d1\u73b0 vscode \u53ef\u4ee5\u57fa\u4e8e node \u901a\u8fc7 js \u6216\u8005 ts \u7684\u65b9\u5f0f\u6765\u5199\u63d2\u4ef6\uff0c\u8fd9\u4e0d\u662f\u5c31\u662f\u8ba9\u6211\u64cd\u4f5c\u7684\u561b\uff0c\u770b\u4e86\u6587\u6863\uff0c\u5199\u4e86\u4e00\u4e2a\u6bd4\u8f83\u7b80\u5355\u7684\u63d2\u4ef6\u51fa\u6765<\/p>\n<p>\u7b2c\u4e00\u6b21\u5199 vscode \u63d2\u4ef6\uff0c\u4e5f\u662f\u7b2c\u4e00\u6b21\u5199\u57fa\u4e8e node \u7684\u9879\u76ee\uff0c\u671f\u95f4\u67e5\u4e86\u5404\u79cd\u5404\u6837\u7684\u6587\u6863\uff0c\u52a0\u4e0a\u4e00\u4e2a\u4eba\u5f00\u53d1\uff0c\u81ea\u5df1\u4e5f\u662f\u7b80\u5355\u7684\u6d4b\u8bd5\u4e86\u4e00\u4e0b\uff0c\u53ef\u80fd\u4f1a\u6709\u4e9b bug\uff0c\u4e0d\u8fc7\u63d0\u5347\u5de5\u4f5c\u6548\u7387\u8fd8\u662f\u53ef\u4ee5\u7684\u3002<\/p>\n<h2>\u4ee3\u7801<\/h2>\n<p>\u53ef\u4ee5\u914d\u5408 sync setting \u7b49 vscode \u914d\u7f6e\u540c\u6b65\u63d2\u4ef6\u6765\u540c\u6b65\u914d\u7f6e \u6b22\u8fce star\uff0c\u63d0 issues<\/p>\n<p>\u6398\u91d1<\/p>\n<p>\u6838\u5fc3\u4ee3\u7801<\/p>\n<p>\u63d2\u4ef6<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>3<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1421470\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : stillyu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u914d\u7f6e\u662f\u6574\u4e2a vscode \u7528\u540c\u4e00\u4e2a\u5417\uff1f\u591a\u4e2a\u9879\u76ee\u600e\u4e48\u529e\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1421471\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : stillyu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             https:\/\/www.npmjs.com\/package\/ssh-deploy-release<br \/>\u6211\u4e4b\u524d\u7528\u7684\u8fd9\u4e2a\uff0c\u5199\u597d\u811a\u672c\u653e\u5728\u9879\u76ee\u4e0b\uff0c\u611f\u89c9\u66f4\u65b9\u4fbf\u4e00\u70b9                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1421472\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : CononYc <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @stillyu \u53ef\u4ee5\u914d\u7f6e\u542f\u7528\u7684\u914d\u7f6e\uff0c\u5c31\u662f\u90a3\u4e2a active                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5199\u4e86\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u81ea\u52a8\u6784\u5efa\u90e8\u7f72 vs&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/85456"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=85456"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/85456\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=85456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=85456"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=85456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}