简体   繁体   English

在Visual Studio中发布Web应用程序,然后在远程计算机上运行npm install

[英]Publish a web application in visual studio and run npm install on the remote machine

I have integrated npm with visual studio and I can run my project locally as it has all the required dependencies in the node_modules locally. 我已经将npm与visual studio集成在一起,并且可以在本地运行我的项目,因为它在本地的node_modules中具有所有必需的依赖项。

Now I want to publish this web app to remote server but I don't want to add all the node_modules in to the version control and eventually as a part of publish. 现在,我想将此Web应用程序发布到远程服务器,但我不想将所有的node_modules添加到版本控件中,并最终将其作为发布的一部分。

How can I publish my web app to the destination and then run npm install on that machine so that it fetches the node_modules based on my package.json. 如何将我的Web应用发布到目标,然后在该计算机上运行npm install,以便它基于我的package.json获取node_modules。

Thanks 谢谢

I was able to fix it. 我能够解决它。 I included the nodemodules/** in my project file and have the jenkins run npm install before it builds the project. 我在项目文件中包含了nodemodules / **,并让jenkins在构建项目之前运行npm install。 Once npm install is done, the build process picks up the file created under npm install and ships with other files 完成npm安装后,构建过程将选择在npm install下创建的文件并与其他文件一起提供

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM