diff --git a/assetman/__init__.py b/assetman/__init__.py index 9994c39..03f5dd5 100644 --- a/assetman/__init__.py +++ b/assetman/__init__.py @@ -1,5 +1,5 @@ from assetman.manifest import Manifest # also update in setup.py -__version__ = "0.1.21" -version_info = (0, 1, 21) +__version__ = "0.2.0" +version_info = (0, 2, 0) diff --git a/assetman/compilers.py b/assetman/compilers.py index 222f977..d842e23 100644 --- a/assetman/compilers.py +++ b/assetman/compilers.py @@ -150,10 +150,12 @@ class CSSCompiler(AssetCompiler, assetman.managers.CSSManager): include_expr = 'include_css' def do_compile(self, **kwargs): - """Compiles CSS files using the YUI compressor. Since the compressor + """Compiles CSS files using the minify compressor. Since the compressor will only accept a single input file argument, we have to manually concat the CSS files in the batch and pipe them into the compressor. + https://github.com/tdewolff/minify/tree/master/cmd/minify + This also allows us to accept a css_input argument, so this function can be used by the compile_less function as well. """ @@ -164,8 +166,8 @@ def do_compile(self, **kwargs): if not kwargs.get("skip_inline_images"): css_input = self.inline_images(css_input) cmd = [ - self.required_setting_file("java_bin"), '-Xss64m', '-jar', self.required_setting_file("yui_compressor_path"), - '--type', 'css', '--line-break', '160', + self.required_setting_file("minify_compressor_path"), + '--type=css' ] return run_proc(cmd, stdin=css_input) diff --git a/assetman/settings.py b/assetman/settings.py index 4299bd6..23cd58c 100644 --- a/assetman/settings.py +++ b/assetman/settings.py @@ -31,7 +31,7 @@ } default_settings = { "closure_compiler":"/bin/closure-compiler.jar", - "yui_compressor_path": "/bin/yuicompressor.jar", + "minify_compressor_path": "/bin/minify", "sass_compiler": "/bin/sass", "lessc_path": "/bin/lessc", "java_bin": "java" diff --git a/assetman/tests/test_compiler.py b/assetman/tests/test_compiler.py index 2d61c3c..83a77dc 100644 --- a/assetman/tests/test_compiler.py +++ b/assetman/tests/test_compiler.py @@ -27,7 +27,7 @@ def get_settings(**opts): force_recompile=False, skip_inline_images=True, closure_compiler=opts.get('closure_compiler', '/bitly/local/bin/closure-compiler.jar'), - yui_compressor_path=opts.get('yui_compressor_path', '/bitly/local/bin/yuicompressor.jar'), + minify_compressor_path=opts.get('minify_compressor_path', '/bitly/local/bin/minify'), sass_compiler=opts.get('sass_compiler', '/bitly/local/bin/sass'), lessc_path=opts.get('lessc_path', '/bitly/local/bin/lessc'), aws_username=None, diff --git a/assetman/tests/test_settings b/assetman/tests/test_settings index bb1d12a..bfa7d0f 100644 --- a/assetman/tests/test_settings +++ b/assetman/tests/test_settings @@ -1 +1 @@ -{"testkey2": "testvalue2", "testkey1": "testvalue1", "yui_compressor_path": "/bin/yuicompressor.jar", "lessc_path": "/bin/lessc", "sass_compiler": "/bin/sass", "closure_compiler": "/bin/closure-compiler.jar"} \ No newline at end of file +{"testkey2": "testvalue2", "testkey1": "testvalue1", "minify_compressor_path": "/bin/minify", "lessc_path": "/bin/lessc", "sass_compiler": "/bin/sass", "closure_compiler": "/bin/closure-compiler.jar"} \ No newline at end of file diff --git a/assetman/tests/test_settings.py b/assetman/tests/test_settings.py index 7e6ff35..0c8fe32 100644 --- a/assetman/tests/test_settings.py +++ b/assetman/tests/test_settings.py @@ -12,7 +12,7 @@ def test_settings_can_load_from_file(self): 'testkey2': "testvalue2", "lessc_path" : "asdf", "sass_compiler": "asdf", - "yui_compressor_path": "asdf", + "minify_compressor_path": "asdf", "closure_compiler": "asdf" } diff --git a/setup.py b/setup.py index acde016..8c6d345 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from distutils.core import setup setup(name='assetman', - version='0.1.21', # also update in __init__.py + version='0.2.0', # also update in __init__.py description='AssetMan asset manager', url="http://github.com/bitly/assetman", license="Apache Software License",