部署网站,凉亭依赖天青 [英] Deploy website to azure with bower dependencies

查看:116
本文介绍了部署网站,凉亭依赖天青的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有同时使用的NuGet和鲍尔的依赖的ASPNET MVC项目。现在,我需要或者触发鲍尔在部署安装组件或允许他们在我的.gitignore作为后备包括包。当然,我想不包括那些在回购,只是让他们安装部署时,就像使用的NuGet包。我试图按照本指南的http:// gregtrowbridge。 COM /部署-A-凉亭相关节点应用上 - 窗口 - 蔚蓝/ ,但仍然没有什么似乎发生。因此,任何帮助是值得欢迎的:)

I have an ASPNET mvc project using both Nuget and Bower for dependencies. Now I need to either trigger bower to install components upon deployment or as fallback include the packages by allowing them in my .gitignore. Of course I would like to not include those in the repo and just have them installed while deploying, just like with nuget packages. I tried to follow this guide http://gregtrowbridge.com/deploying-a-bower-dependent-node-app-on-windows-azure/ but still nothing seems to happen. So any help is welcome :)

最好的问候

推荐答案

所有的Azure网站工作者有凉亭pre-安装应该是你的路径上。

All of Azure Websites workers have bower pre-installed and should be on your path.

所有你需要做的就是添加自定义部署脚本,会做亭子安装
下面是一个使用亭子

All you need to do is add a custom deployment script that would do bower install Here is a sample repo for an ASP.NET MVC site that uses bower

基本上确保bower.json是存在的,<一个href=\"https://github.com/ahmelsayed-test/MvcWithBower/blob/master/MvcWithBower.csproj#L105\">referenced在你的的csproj

Basically make sure bower.json is there and referenced in your csproj

    <Content Include="bower.json" />

然后下载您的自定义部署脚本。如果你去 https://开头&LT; yourSiteName&GT; .scm.azurewebsites.net 然后点击工具 - &GT;下载自定义部署脚本或只是从下载D:\\家\\部署\\工具然后检查它在你的<一个根href=\"https://github.com/ahmelsayed-test/MvcWithBower/commit/537b3118b50029c75db3bfc11dba2b2212cf1c9e\">repo喜欢这里基本上会有2个文件 deploy.cmd .deployment

Then download your custom deployment script. if you go to https://<yourSiteName>.scm.azurewebsites.net then click on Tools -> Download custom deployment script or just download it from D:\home\deployment\tools then check it in the root of your repo like here basically there will be 2 files deploy.cmd and .deployment

这是部署的逻辑,增加一个步骤,以恢复它亭子<一个href=\"https://github.com/ahmelsayed-test/MvcWithBower/commit/502ba86e141e5b14c2fbf07933b176ee0cd9c6bf\">like还有最后一个步骤后这里

this is the deployment logic, add a step to restore bower in it like here after the last step there

:: 4. Bower Install
if EXIST "%DEPLOYMENT_TARGET%\bower.json" (
    pushd "%DEPLOYMENT_TARGET%"
    call :ExecuteCmd bower install
    IF !ERRORLEVEL! NEQ 0 goto error
    popd
)

这篇关于部署网站,凉亭依赖天青的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆