File: closure.py

package info (click to toggle)
django-pipeline 1.3.24-0.2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 544 kB
  • ctags: 349
  • sloc: python: 1,706; makefile: 114
file content (10 lines) | stat: -rw-r--r-- 359 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
from __future__ import unicode_literals

from pipeline.conf import settings
from pipeline.compressors import SubProcessCompressor


class ClosureCompressor(SubProcessCompressor):
    def compress_js(self, js):
        command = '%s %s' % (settings.PIPELINE_CLOSURE_BINARY, settings.PIPELINE_CLOSURE_ARGUMENTS)
        return self.execute_command(command, js)