将 WebDeploy 与 Azure 节点网站一起使用不会触发 npm install
Using WebDeploy with an Azure node website doesn't trigger npm install
我正在使用 WebDeploy 将节点网站部署到 Azure。
我在示例和演示中看到它应该在部署时触发 npm install
。
但事实并非如此。我还看到几乎每个演示都使用 git 部署。
WebDeploy 不支持自动 npm install
还是我遗漏了什么?
当您使用 WebDeploy 时,它只会将所有文件从您的计算机复制到云端,不会触发任何构建过程。您必须负责确保您的应用已准备好 运行。
如果你想要CI功能,请设置继续部署,这里是设置本地git的教程
https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/
如果您在 github/bitbucket/Visual studio Team Service 等中有存储库,还有其他选项...(转到 https://portal.azure.com、select 您的站点 --> 所有设置 -- > 持续部署以查看所有支持的选项)
根据文档 Publish to Microsoft Azure Website using Web Deploy,它说
Deployment will include all the files in your project. Files in the node_modules folder are included automatically, even if they are not part of the project.
所以你在VS中的项目文件夹下的所有文件,包括node_modules文件夹,都将被部署。
我正在使用 WebDeploy 将节点网站部署到 Azure。
我在示例和演示中看到它应该在部署时触发 npm install
。
但事实并非如此。我还看到几乎每个演示都使用 git 部署。
WebDeploy 不支持自动 npm install
还是我遗漏了什么?
当您使用 WebDeploy 时,它只会将所有文件从您的计算机复制到云端,不会触发任何构建过程。您必须负责确保您的应用已准备好 运行。
如果你想要CI功能,请设置继续部署,这里是设置本地git的教程 https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/
如果您在 github/bitbucket/Visual studio Team Service 等中有存储库,还有其他选项...(转到 https://portal.azure.com、select 您的站点 --> 所有设置 -- > 持续部署以查看所有支持的选项)
根据文档 Publish to Microsoft Azure Website using Web Deploy,它说
Deployment will include all the files in your project. Files in the node_modules folder are included automatically, even if they are not part of the project.
所以你在VS中的项目文件夹下的所有文件,包括node_modules文件夹,都将被部署。