Don't generate minified_assets.json

The new minification process no longer needs it.

(imported from commit cd192120f74f58b10165807903b3318ae0a2c2b6)
This commit is contained in:
Scott Feeney 2013-07-03 16:47:59 -04:00
parent 2c33320746
commit 0f734fad2b
1 changed files with 2 additions and 32 deletions

View File

@ -1,8 +1,6 @@
from django.conf import settings
from django.contrib.staticfiles.storage import CachedFilesMixin, StaticFilesStorage
from pipeline.storage import PipelineMixin
import os.path
import ujson
class AddHeaderMixin(object):
def post_process(self, paths, dry_run=False, **kwargs):
@ -50,34 +48,6 @@ class AddHeaderMixin(object):
return ret_dict.itervalues()
class DumpManifestMixin(object):
""" This mixin creates a JSON manifest file in the deployment root
with a dict mapping generated files' base names (like api.js) to their
names with the hash for the most recent version (api.HEX_HASH_HERE.js).
"""
def post_process(self, paths, dry_run=False, **kwargs):
if dry_run:
return
super_class = super(DumpManifestMixin, self)
if hasattr(super_class, 'post_process'):
super_ret = super_class.post_process(paths, dry_run, **kwargs)
else:
super_ret = []
hashed_versions = {} # Latest hashed version of each file.
for old_path, new_path, processed in super_ret:
if old_path[:4] == 'min/':
hashed_versions[old_path] = new_path
manifest_filename = os.path.join(settings.DEPLOY_ROOT,
'minified_assets.json')
with open(manifest_filename, 'w') as manifest_file:
manifest_file.write(ujson.dumps(hashed_versions))
return super_ret
class HumbugStorage(PipelineMixin, AddHeaderMixin, DumpManifestMixin,
CachedFilesMixin, StaticFilesStorage):
class HumbugStorage(PipelineMixin, AddHeaderMixin, CachedFilesMixin,
StaticFilesStorage):
pass