Remove vestigial parts of old minify code

(imported from commit 692e292528a1697687f1b3024c58371b2cf9b5c9)
This commit is contained in:
Scott Feeney
2013-07-05 13:24:40 -04:00
parent 3942907eec
commit ffa8541818
2 changed files with 0 additions and 34 deletions

View File

@@ -1,29 +0,0 @@
from __future__ import absolute_import
from django.conf import settings
from hashlib import sha1
from os import path
from pipeline.compressors import SubProcessCompressor
class ClosureSourceMapCompressor(SubProcessCompressor):
def compress_js(self, js):
# js is the full text of the JavaScript source, and we can't
# easily get either the input file names or the output file
# name. So we just pick a unique arbitrary name. This is
# okay because we can figure out from the source map file
# contents which JavaScript files it corresponds to. But we
# use a special comment to identify app.js, so that automatic
# source mapping works.
if 'MINIFY-FILE-ID: zephyr.js' in js:
source_map_name = 'app.js.map'
else:
source_map_name = sha1(js).hexdigest() + '.map'
source_map = path.join(
settings.PIPELINE_CLOSURE_SOURCE_MAP_DIR, source_map_name)
command = '%s --language_in ECMASCRIPT5 --create_source_map %s' % (
settings.PIPELINE_CLOSURE_BINARY, source_map)
return self.execute_command(command, js)

View File

@@ -1,8 +1,3 @@
// zephyr/lib/minify.py will look for this comment in order to tell when it's
// producing app.js:
//
// MINIFY-FILE-ID: zephyr.js
var all_msg_list = new MessageList(); var all_msg_list = new MessageList();
var home_msg_list = new MessageList('zhome', new narrow.Filter([["in", "home"]])); var home_msg_list = new MessageList('zhome', new narrow.Filter([["in", "home"]]));
var narrowed_msg_list; var narrowed_msg_list;