bootstrap-bower icon indicating copy to clipboard operation
bootstrap-bower copied to clipboard

Separate bower packages for modules

Open vhpoet opened this issue 11 years ago • 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?

vhpoet avatar Jan 17 '14 00:01 vhpoet

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.

joshdmiller avatar Jan 17 '14 01:01 joshdmiller

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.

vhpoet avatar Jan 18 '14 00:01 vhpoet

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

ajoslin avatar Jan 19 '14 04:01 ajoslin

Cool, thanks.

vhpoet avatar Jan 21 '14 18:01 vhpoet

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.)

mhelvens avatar Feb 05 '14 00:02 mhelvens

+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?

paveleremin avatar Aug 10 '15 09:08 paveleremin

+1

rgnevashev avatar Aug 14 '15 08:08 rgnevashev

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

paveleremin avatar Aug 14 '15 08:08 paveleremin

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

rgnevashev avatar Aug 15 '15 17:08 rgnevashev

+1

eugef avatar Nov 05 '15 12:11 eugef

I did this but this is so bad: bower install --save [email protected]: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.

pdemanget avatar Dec 09 '15 10:12 pdemanget

+1

GuiToniello avatar Jan 13 '16 10:01 GuiToniello