# Path: gears/compressors/base.py
# class BaseCompressor(BaseAssetHandler):
#     """Base class for all asset compressors. Subclass's :meth:`__call__` method
#     must return compressed :attr:`~gears.assets.Asset.bundled_source` attribute.
#     """
# 
# Path: gears/exceptions.py
# class ImproperlyConfigured(Exception):
#     pass


    from slimit import minify
from .base import BaseCompressor
from ..exceptions import ImproperlyConfigured
from __future__ import absolute_import

try:
    slimit_available = True
except ImportError:
    slimit_available = False



class SlimItCompressor(BaseCompressor):

    def __init__(self):
        if not slimit_available:
            raise ImproperlyConfigured('Slimit is not available')

    def __call__(self, asset):

# Path: gears/compressors/base.py
# class BaseCompressor(BaseAssetHandler):
#     """Base class for all asset compressors. Subclass's :meth:`__call__` method
#     must return compressed :attr:`~gears.assets.Asset.bundled_source` attribute.
#     """
# 
# Path: gears/exceptions.py
# class ImproperlyConfigured(Exception):
#     pass


# Path: gears/compressors/slimit.py
    from slimit import minify
from .base import BaseCompressor
from ..exceptions import ImproperlyConfigured

from __future__ import absolute_import

try:
    slimit_available = True
except ImportError:
    slimit_available = False



class SlimItCompressor(BaseCompressor):

    def __init__(self):
        if not slimit_available:
            raise ImproperlyConfigured('Slimit is not available')

    def __call__(self, asset):

        return minify(asset.bundled_source, mangle=True)