{"id":199836,"date":"2020-09-11T08:35:18","date_gmt":"2020-09-11T00:35:18","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=199836"},"modified":"2020-08-29T09:36:38","modified_gmt":"2020-08-29T01:36:38","slug":"layabox-vscode-linux","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/layabox-vscode-linux.html","title":{"rendered":"\u89e3\u6790layabox2.0\u547d\u4ee4\u884c\u5728vscode\u4e2d\u7f16\u8bd1\u6253\u5305\u95ee\u9898"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u8fd9\u7bc7\u6587\u7ae0\u4e3b\u8981\u4ecb\u7ecd\u4e86layabox2.0\u547d\u4ee4\u884c\u5728vscode\u4e2d\u7f16\u8bd1\u6253\u5305\u95ee\u9898,\u672c\u6587\u7ed9\u5927\u5bb6\u4ecb\u7ecd\u7684\u975e\u5e38\u8be6\u7ec6\uff0c\u5bf9\u5927\u5bb6\u7684\u5b66\u4e60\u6216\u5de5\u4f5c\u5177\u6709\u4e00\u5b9a\u7684\u53c2\u8003\u501f\u9274\u4ef7\u503c\uff0c\u9700\u8981\u7684\u670b\u53cb\u53ef\u4ee5\u53c2\u8003\u4e0b<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\u68c0\u67e5node\u7684\u7248\u672c\u548cgulp\u7248\u672c\uff0c\u6700\u597d\u4f7f\u7528nvm\u6765\u7ba1\u7406node\u7248\u672c\uff0c\u672c\u4eba\u9047\u5230\u8fd9\u4e24\u79cd\u7248\u672c\u5339\u914d\u7684\u65f6\u5019\u4f1a\u9020\u6210layaair2-cmd\u547d\u4ee4\u7f16\u8bd1\u62a5\u9519\u7684\u95ee\u9898<\/p>\n

\u5f62\u5982\u4e0b\u9762\u7684\u62a5\u9519<\/strong><\/span><\/div>\n
primordials is not defined<\/pre>\n

\u6211\u4f7f\u7528\u7684\u6b63\u786e\u7684\u4e00\u7ec4\u7248\u672c\u5339\u914d<\/p>\n

PS E:\\study\\project\\laya\\layaTestApp> nvm list\r\n \r\n  12.16.2\r\n * 10.4.0 (Currently using 64-bit executable)\r\nPS E:\\study\\project\\laya\\layaTestApp> gulp -v\r\nCLI version: 2.2.0\r\nLocal version: 4.0.2\r\nPS E:\\study\\project\\laya\\layaTestApp><\/pre>\n
\u4e0b\u9762\u5b89\u88c5layaair2-cmd<\/strong><\/span><\/div>\n
npm i layaair2-cmd -g<\/pre>\n

\u5b89\u88c5\u5b8c\u4ee5\u540e\u5c31\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u884c\u4e86\u554a<\/p>\n

\u53d1\u5e03\u547d\u4ee4<\/strong><\/span><\/div>\n
layaair2-cmd compile<\/pre>\n
\u6253\u5305\u547d\u4ee4<\/strong><\/span><\/div>\n
\/\/HTML5\u7248\u672c\u53d1\u5e03\u547d\u4ee4\r\nlayaair2-cmd publish -c web\r\n\/\/\u5fae\u4fe1\u5c0f\u6e38\u620f\u7248\u672c\u53d1\u5e03\u547d\u4ee4\r\nlayaair2-cmd publish -c wxgame\r\n\/\/\u767e\u5ea6\u5c0f\u6e38\u620f\u7248\u672c\u53d1\u5e03\u547d\u4ee4\r\nlayaair2-cmd publish -c bdgame\r\n\/\/\u5c0f\u7c73\u5feb\u6e38\u620f\u7248\u672c\u53d1\u5e03\u547d\u4ee4\r\nlayaair2-cmd publish -c xmgame\r\n\/\/OPPO\u5c0f\u6e38\u620f\u7248\u672c\u53d1\u5e03\u547d\u4ee4\r\nlayaair2-cmd publish -c oppogame\r\n\/\/vivo\u5c0f\u6e38\u620f\u7248\u672c\u53d1\u5e03\u547d\u4ee4\r\nlayaair2-cmd publish -c vivogame\r\n\/\/QQ\u5c0f\u6e38\u620f\u7248\u672c\u53d1\u5e03\u547d\u4ee4\r\nlayaair2-cmd publish -c qqgame<\/pre>\n
\u6ce8\u610f
\n<\/strong><\/span><\/div>\n

\u9664\u4e86\u7f16\u8bd1\u547d\u4ee4\u4ee5\u5916\uff0c\u5bf9\u4e8e\u53d1\u5e03\u547d\u4ee4\uff0c\u9700\u8981\u4f60\u5728laya\u7684\u7f16\u8f91\u5668\u91cc\u624b\u52a8\u53d1\u5e03\u4e00\u6b21\uff0c\u4e0d\u7136\u4f1a\u63d0\u793a\u4f60\u627e\u4e0d\u5230\u5bf9\u5e94\u7684json\u6587\u4ef6\uff0c\u6bd4\u5982wxgame.json<\/p>\n

\u9664\u6b64\u4e4b\u5916\uff0c\u82e5\u662f\u60f3\u5728vscode\u754c\u9762\u70b9\u51fbf5,\u53ef\u4ee5\u6267\u884c\u7f16\u8bd1\u7136\u540e\u5728\u542f\u52a8\uff0c\u9700\u8981\u914d\u7f6e\u4e00\u4e0btasks.json\u548claunch.json<\/p>\n

tasks.json
\n<\/strong><\/span><\/div>\n
{\r\n  \"version\": \"2.0.0\",\r\n  \"tasks\": [\r\n    {\r\n      \"label\": \"compile\",\r\n      \"type\": \"shell\",\r\n      \"command\": \"layaair2-cmd compile\",\r\n      \"group\":{\r\n        \"kind\": \"build\",\r\n        \"isDefault\": true\r\n      }\r\n    }\r\n  ]\r\n}<\/pre>\n
launch.json<\/strong><\/span><\/div>\n
\r\n\"preLaunchTask\": \"compile\"<\/pre>\n

\u5230\u6b64\u8fd9\u7bc7\u5173\u4e8elayabox2.0\u547d\u4ee4\u884c\u5728vscode\u4e2d\u7f16\u8bd1\u6253\u5305\u95ee\u9898\u7684\u6587\u7ae0\u5c31\u4ecb\u7ecd\u5230\u8fd9\u4e86<\/p>\n","protected":false},"excerpt":{"rendered":"

\u68c0\u67e5node\u7684\u7248\u672c\u548cgulp\u7248\u672c\uff0c\u6700\u597d\u4f7f\u7528nvm\u6765\u7ba1\u7406node\u7248\u672c\uff0c\u672c\u4eba\u9047\u5230\u8fd9\u4e24\u79cd\u7248\u672c\u5339\u914d\u7684\u65f6\u5019\u4f1a\u9020\u6210laya […]<\/p>\n","protected":false},"author":1482,"featured_media":151134,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-199836","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/199836","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1482"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=199836"}],"version-history":[{"count":4,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/199836\/revisions"}],"predecessor-version":[{"id":199845,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/199836\/revisions\/199845"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/151134"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=199836"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=199836"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=199836"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}