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 :)
Best regards
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 bowerBasically make sure bower.json is there and referenced in your
csproj
Then download your custom deployment script. if you go to
https://<yourSiteName>.scm.azurewebsites.net
then click onTools -> Download custom deployment script
or just download it fromD:\home\deployment\tools
then check it in the root of your repo like here basically there will be 2 filesdeploy.cmd
and.deployment
this is the deployment logic, add a step to restore bower in it like here after the last step there
You can use the console feature of Azure web app to fire the commands. Even if the console has access to a restricted features, you can still install the bower components by using the command:
The console option is listed under the deployment section of the Web Apps. You can refer the below the screen for reference.
Prerequisites:
Hope it helps.
One important addition to the above - you must push both the unchanged .deployment file and modified .cmd file to deployment root for Azure to subsequently copy/execute your .cmd amendments. Otherwise it will regenerate a default .cmd