nvbn / django-bower

Easy way to use bower with your django project
https://django-bower.readthedocs.io/
518 stars 74 forks source link

Add library package #2

Closed gcmalloc closed 7 years ago

gcmalloc commented 11 years ago

Hi, I really love the idea. How hard would it be possible to add support for library groups. For example, I have two pages:

nvbn commented 11 years ago

You mean declaring like:

BOWER_PACKAGES = {
    'somelibjs': {
        'somelibjs#2.0.0',
        'jquery#1.7',
    },
    'otherlibjs': {
        'backbone',
        'jquery#1.9',
    },
}

?

gcmalloc commented 11 years ago

exactly

scardine commented 10 years ago

Interesting, most of the time I load all libraries in all pages and never think about it. Often I don't need all libraries I'm loading in the home page, but a positive side effect is that by the time the user logs in all libraries are already in the browser cache.

When I have an use case where clients are resource constrained, and a low memory footprint is more important than download time, I use dependency injection.

gsong commented 10 years ago

@gcmalloc I don't really understand what bower has to do with how you use the JS libraries in your HTML. Can you elaborate a little bit more?