django-media-bundler
django-media-bundler copied to clipboard
files being generated twice
Hi. I just found this project and decided to check it out. Is it intended to create two copies of the bundled files when using versioning? I.E. css_bundle_name.a6cb96e3f3795fbb06dd43c7f469ac7a94b56a86.css and css_bundle_name.css are generated...
Here are the settings I have:
media_bundler settings
USE_BUNDLES = True DEFER_JAVASCRIPT = False BUNDLE_VERSION_FILE = os.path.join(os.path.dirname(file), 'bundle_versions.py').replace('','/')
MEDIA_BUNDLES = ( {"type": "css", "name": "css_bundle_name", "path": MEDIA_ROOT + "/css/", "url": MEDIA_URL + "static/css/", "minify": True, # If you want to minify your source. "files": ( "superfish/superfish.css", "superfish/superfish-navbar.css", "superfish/superfish-vertical.css", )}, {"type": "javascript", "name": "js_bundle_name", "path": MEDIA_ROOT + "/js/", "url": MEDIA_URL + "static/js/", "minify": True, # If you want to minify your source. "files": ( "jquery/jquery-1.4.1.js", "jquery/plugins/jquery.bgiframe.js", "jquery/plugins/jquery.clearfield.js", )}, )
my settings file got mangled by GitHub Flavored Markdown
I haven't really finished the cache busting/versioning features, but looking at the current code, that is what it does. :) Fixing that would probably just involve changing the shutil.copy to shutil.move or something similar.
I changed the way the cache busting works in a way that prevents this duplication:
https://github.com/Leftfield/django-media-bundler/commit/66af89ecebae20d1dbeeeefb1c2538bc4cc8dc28
Feel free to pull.