aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/compressor/minify.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/compressor/minify.py')
-rw-r--r--plugins/compressor/minify.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/plugins/compressor/minify.py b/plugins/compressor/minify.py
index dcf50fe..9107882 100644
--- a/plugins/compressor/minify.py
+++ b/plugins/compressor/minify.py
@@ -27,11 +27,12 @@ __all__ = ('process_multiple_files', 'prefixer_extensioner',
'make_arguments_parser', 'main')
color = {
- 'cyan' : '\033[1;36m',
- 'end' : '\033[0m',
- 'green' : '\033[1;32m'
+ 'cyan': '\033[1;36m',
+ 'end': '\033[0m',
+ 'green': '\033[1;32m'
}
+
def process_multiple_files(file_path, watch=False, wrap=False, timestamp=False,
comments=False, sort=False, overwrite=False,
zipy=False, prefix='', add_hash=False):
@@ -95,7 +96,9 @@ def process_single_css_file(css_file_path, wrap=False, timestamp=False,
zipy=False, prefix='', add_hash=False,
output_path=None):
"""Process a single CSS file."""
- print("Processing %sCSS%s file: %s" % (color['cyan'], color['end'], css_file_path))
+ print("Processing %sCSS%s file: %s" % (color['cyan'],
+ color['end'],
+ css_file_path))
with open(css_file_path, encoding="utf-8") as css_file:
original_css = css_file.read()
@@ -134,7 +137,9 @@ def process_single_css_file(css_file_path, wrap=False, timestamp=False,
def process_single_js_file(js_file_path, timestamp=False, overwrite=False,
zipy=False, output_path=None):
"""Process a single JS file."""
- print("Processing %sJS%s file: %s" % (color['green'], color['end'], js_file_path))
+ print("Processing %sJS%s file: %s" % (color['green'],
+ color['end'],
+ js_file_path))
with open(js_file_path, encoding="utf-8") as js_file:
original_js = js_file.read()
print("INPUT: Reading JS file %s" % js_file_path)
@@ -173,7 +178,8 @@ def make_arguments_parser():
SHA1 HEX-Digest 11 Chars Hash on Filenames is used for Server Cache.
CSS Properties are Alpha-Sorted, to help spot cloned ones, Selectors not.
Watch works for whole folders, with minimum of ~60 Secs between runs.""")
- # parser.add_argument('--version', action='version', version=css_js_minify.__version__)
+ # parser.add_argument('--version', action='version',
+ # version=css_js_minify.__version__)
parser.add_argument('fullpath', metavar='fullpath', type=str,
help='Full path to local file or folder.')
parser.add_argument('--wrap', action='store_true',