Coder Social home page Coder Social logo

Comments (16)

rosieks avatar rosieks commented on May 14, 2024 2

@chrisrpatterson Could you just tell me why NPM and NuGet package managers have dedicated tasks and Bower doesn't? Actually all of them can be run from build script.

from azure-pipelines-tasks.

Peter-Juhasz avatar Peter-Juhasz commented on May 14, 2024 1

I do not think it is a good practice to store any packages in the repository. Only if you want to eliminate the dependency of the package source, so you can build even if it is offline.

from azure-pipelines-tasks.

chrispat avatar chrispat commented on May 14, 2024

wouldn't you simply call bower from your grunt or gulp script?

from azure-pipelines-tasks.

rosieks avatar rosieks commented on May 14, 2024

Probably I could but default template for ASP.NET 5 doesn't use bower inside gulp but rather depends on built-in support for bower components restore in Visual Studio. So I think that it would be nice to have similar experience in TFS build.

from azure-pipelines-tasks.

chrispat avatar chrispat commented on May 14, 2024

For ASP.NET 5 you would want to run DNU Restore. Here is an article on build an ASP.NET 5 app with team build https://msdn.microsoft.com/Library/vs/alm/Build/azure/deploy-aspnet5. Currently it relies on some scripts but as it settles down and comes closer to release we will add more built in support.

from azure-pipelines-tasks.

cwoolum avatar cwoolum commented on May 14, 2024

You shouldn't be running bower install during build time. It is
recommended to check in bower components by the bower team:

“If you aren’t authoring a package that is intended to be consumed by
others (e.g., you’re building a web app), you should always check installed
packages into source control.”

This is strange for most people because you are not supposed to check nuget packages in.

from azure-pipelines-tasks.

chrispat avatar chrispat commented on May 14, 2024

That is interesting, the default project.json for ASP.NET 5 does run bower install in the post restore section. I would agree that seems odd as typically bower components are frontend javascript and HTML and not binaries so checking them in seems like the right thing to do.

from azure-pipelines-tasks.

rosieks avatar rosieks commented on May 14, 2024

@cwoolum - could you provide link to that recommendation? I can't find that on bower site.

from azure-pipelines-tasks.

Bartmax avatar Bartmax commented on May 14, 2024

I also want to know why that's the recommendations.

from azure-pipelines-tasks.

Bartmax avatar Bartmax commented on May 14, 2024

can someone help me to execute bower install on the server? I tried lot of things already to no avail.

tried adding bower to devDependencies, (this make npm install takes forever to run), and I'm charged by the minute so I don't see why it doesn't use a cache or something or better download connection, but that's for another issue.

then using command line
command: node_modules/.bin/bower.cmd
parameters: install

error:
File not found: node_modules/.bin/bower.cmd

I already tried different config/scenarios but it takes like 5 minutes to queue a build and get the error, very frustrating to 'try/test'...

thanks

from azure-pipelines-tasks.

cwoolum avatar cwoolum commented on May 14, 2024

It looks like they have removed it. Maybe that's not the case anymore??

All I can find is a historical version of the page that had it
https://web.archive.org/web/20140625034714/http://bower.io/#installing-packages-and-dependencies

I think the reason that you wanted to be checking in the bower_components folder is because there isn't a lockfile for bower so you could inadvertently grab a different version of a package when you deploy vs. just developing on your local machine(dependencies, not direct references). This could cause your app to be broken after deploy even though it works fine in Dev.

bower/bower#505

from azure-pipelines-tasks.

Bartmax avatar Bartmax commented on May 14, 2024

@cwoolum interestingly that work (lock file) were done on Mar bower/bower#1748 and is still waiting for merge.

from azure-pipelines-tasks.

chrispat avatar chrispat commented on May 14, 2024

We don't have any plans for an inbox bower task. Bower really feels like something that you should run from your build script.

from azure-pipelines-tasks.

Bartmax avatar Bartmax commented on May 14, 2024

@chrisrpatterson I'm ok with that, just in case someone needs this check out http://stackoverflow.com/questions/32348497/bower-install-on-visual-studio-online-build took me a while to get it working.

from azure-pipelines-tasks.

bryanmacfarlane avatar bryanmacfarlane commented on May 14, 2024

Another option is to create an extension and offer it in the gallery. If the gallery would have existed when we started build.vnext, many of the 'inthebox' tasks would have been extensions.

https://www.visualstudio.com/integrate/extensions/develop/add-build-task

No reason anyone in the community couldn't offer it as an open source first class task

from azure-pipelines-tasks.

iyerusad avatar iyerusad commented on May 14, 2024

I know this is an ancient issue, but i found using the Shell Script task with following content worked for me:
bower install --allow-root. Dropping a note if anyone else stumbles into this in 2018 or later.

from azure-pipelines-tasks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.