angular-ui/bootstrap-bower

Separate bower packages for modules

Opened this issue · 12 comments

Let's say I wanna use ui.bootstrap.popover and ui.bootstrap.tooltip without anything else. The only way right now is to copy those modules in a separate file and store it in my projects repo, which is problematic because I will need to update it manually each time you change anything on them.

What if you setup bower packages for each module with their dependencies?

Actually, you can create a custom build containing only the modules you need right from the website. Go to http://angular-ui.github.io/bootstrap and click "Create a Build". You'd have to do this with each release, but the overhead is small.

However, for logistical reasons, I would opt against publishing to several different bower endpoints due to high administrative overhead. Also, it would not reflect the many combinations people would make. For example, popover requires tooltip so if someone included both they would get tooltip included twice, which will cause errors.

But I'll let my compatriots weigh in too.

You're right, creating a build from a website may take less time, but the problem of automation is still there.

Duplicate inclusion problem may disappear by not having any bower dependencies, so for example if you wanna include popover, please at first include the tooltip.

I know this is not a perfect solution, and I'm not a fan of having bower-* angular-ui repos for each module, but it will at least let us automate things.

It's in the works. There is a PR opened for it, but we have other things to merge in first.

Cool, thanks.

I don't understand the dependency problem here. Just have 'popover' depend on 'tooltip' through bower. No duplication necessary. That's what bower is for. (Dependencies are not bad. They are good.)

+1 for use separate modules: for example I need ONLY pagination for my application, so I don't want load all modules. Is it available now with bower?

I found the solution:

bower install angular-ui-bootstrap --save

this command work for me. Then in index.html file add

<script src="../bower_components/angular-ui-bootstrap/src/pagination/pagination.js"></script>

but I believe, that the project didn't required separate repo with the bower.js file

I use the following
bower i angular-ui-bootstrap --save
grunt build:pagination:carousel:dropdown
and copy the file dist /...- tpls.js in my project

eugef commented

+1

I did this but this is so bad:
bower install --save git@github.com:angular-ui/bootstrap.git
or
bower install --save https://raw.githubusercontent.com/angular-ui/bootstrap/0.14.3/src/datepicker/datepicker.js

the paveleremin solution doesn't work (anymore ?) the module files are not published, can't you just publish the module files? I think it was the case before.