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

What is the value of using this project vs using bower directly?

Open chrisbarry opened this issue 8 years ago • 5 comments

Sorry if this is a stupid question, but what is the value of using this project, vs just using bower directly, say from inside the /static folder?

chrisbarry avatar Jul 16 '15 15:07 chrisbarry

+1

cailloumajor avatar Jul 28 '15 08:07 cailloumajor

The main advantage I see is that django-bower works seamlessly with collectstatic; thus, if you run manage.py bower_install before running manage.py collectstatic, your bower packages are automatically collected for serving, which in turn also allows easy uploading to other storage engines via django-storages (e.g., AWS's CDN).

One other small advantage I see is that you get to define your bower packages in your settings.py file, whereas with using bower directly (which I haven't used), I understand that you use a bower.json file.

pydolan avatar Aug 19 '15 21:08 pydolan

Sure, but that is a fairly small benefit vs wrapping something up inside another API, which then will lead to delays in updating (presumably?) Also, it's probably good for people to know how to interact directly with bower, given the amount of tools that are (not always for the best reasons) written in node.

chrisbarry avatar Aug 20 '15 08:08 chrisbarry

You raise a good point. I think django-bower won't be for everyone, but for those that like the integration with django, django-bower does a good job -- for the reason I described above. However, I've personally decided to forgo it in favor of a direct bower run, mainly to just decouple my front- and back-end management. Collect-static will still work since I added my bower-components directory to my static-dirs list.

pydolan avatar Aug 21 '15 12:08 pydolan

It would be a benefit if bower install was automatically ran with manage.py collectstatic

azmeuk avatar Oct 29 '15 10:10 azmeuk