I've created an open source javascript plugin. It is located on github public repository. When I want to release new version, I'm doing it with github features. My plugin is also indexed in bower repository. How to inform bower, that I have released new version of plugin?
You can update any bower dependency using the "update" command. See below:
bower update <name>
Where is the name of your bower package/dependency.
However, this is assuming that the semvar range provided in the bower.json configuration file allows the installation of the new (versioned) plugin.
As it is authored by you, I doubt very much it would be an issue.
If the above command doesn't work, you can always un-install it and reinstall it as follows:
bower uninstall <name>
bower install <name> --save-dev //or --save, this depends on how you installed it earlier.
Related
Is there a way to install tweenmax using bower?
I've been looking into angular animations and I noticed the egghead tutorial uses tweenmax but it imports it directly into the html. I want to use bower to import so that I can have my imported packages all managed take advantage of the gulp build process to create the minified vendor script.
It seems that they name tweenmax as GSAP. Correct me if I'm mistaken but I believe this is the same thing esp looking at the main section of the bower file (git repo) which points to tweenmax. Thus, I installed using:
bower install gsap --save
Is it possible to get a list of package dependencies (as produced by bower list) before installing the packages?
bower install does not complete successfulfy in my project as some package has a dependency to a non existing package version, therefore I would like to be able to quickly find that package that has this incorrect dependency instead of having to inspect bower.json of every package.
You could try bower-dependency-tree. npm install -g bower-dependency-tree && bower-dependency-tree name_of_the_package_you_are_interested_in should do it.
disclosure: I am the maintainer of the project.
I'd like to use bower in install packages. I'd also like to have the packages in specific places. In particular, I'd like my javascript in '/js'.
You can set a custom directory for where you would like bower to install all the listed dependencies in the bower.json file. Here's a quick from bower's documentation of .bowerrc:
Custom install directory
A custom install location can be set in a .bowerrc file using the
directory property. The .bowerrc file should be a sibling of your
project's bower.json.
{
"directory": "public/bower_components"
}
One of the benefits of Bower is how simple it is. One of the main downfalls of Bower is how simple it is. I do not believe that bower supports setting custom install locations for each dependency. You may have to rely on another tool to do that.
Here's a similar Stack Overflow question about install bower dependencies to different folders. While bower itself is not able to do what you ask, there are a number of tools that add such functionality:
npm bower installer (using npm)
grunt bower task (using
grunt)
grunt bower organizer (using grunt)
I'm building a new solution/project. I copied all the files over and moved all the packages over to the packages folder. When I reference them via nuget, it says they are installed, but
they are not. If they were, I would see them in the installed tab.
First why does it say installed, next how can I install multiple packages at once, instead of
doing it individually. I have like 10+ packages I need to install. This is pain in
the ass, if I have to install each individually. We should be able to run a command that
checks to see if all the packages in the package folder have been installed, if not, install them. Is there a command for this?
Use nuget.exe for this. see following question and google search
nuget install packages.config
Or with NuGet 2.7 you can restore allpackages in the solution using the command line.
nuget restore YourSolution.sln
I've created an issue/question about this on
Github but it didn't
receive any attention, except just more people wondering the same
thing, so I decided to try my luck on StackOverflow.
Q: How do you update your bower ?
My problem:
I had Packery 1.0.6 Installed and when I ran bower update it just scanned the directories and didn't update anything at all.
Then I edited the bower.json file and removed Packery 1.0.6 from dependencies and ran:
bower install packery
That confused bower a little, and it asked me which version I wanted - I selected 1.1.2 and now I have 1.1.2.
Why didn't it update to 1.1.2 in the first place ? How can I trust Bower that I have the latest version of everything installed ?
On top of that, running bower update packery doesn't work as well. I thought bower is supposed to be the magical package manager that takes out the hassle of keeping my packages up to date, but as it turns out - it doesn't do much besides installing new packages...
Bower will automatically install your packages with the notation ~x.x.x. It's based on Semantic Versioning and it's package notation.
It doesn't update everything, because it will respect your app's requirements. In your case:
~1.0.6 := >=1.0.6-0 <1.1.0-0
The change from the ~1.0 to ~1.1 could potentially be breaking, and Bower is not willing to update you package unless you are ok with it. Consider it more of a protection.
If you have your bower.json file set as
>= 1.0.6
It should get you nothing less than 1.0.6.
Check out the ranges section on this page.