Package: tsantsa
Tsantsa provides setuptools commands for minifying CSS and JS resources and
compilation of SCSS resources to CSS usingcssmin,slimitandscss.scss, cssmin and slimit are pure Python packages and do not require any external commands.This package is inspired by and based on the minify package by Sylvain Prat which uses theYUI compressorfrom Yahoo! Inc.When you installtsantsa, three new commands are available:tsantsa_jswhich minifies Javascript filestsantsa_csswhich minifies CSS filescompile_scsswhich compiles SCSS files to CSSSee theUsagesection for more information about these commands.InstallationThe Tsantsa commands are meant to be used in an existing python project. So, in
order to make the commands available in your project, just addtsantsato
the requirements of your project, for example:setup(
    ...
    install_requires=['tsantsa'],
    ...
)Then, when you install your package, the Tsantsa commands will be available.UsageTsantsa provides commands for minifying CSS and JS resources and compiling SCSS
resources:tsantsa_jswhich minifies Javascript filestsantsa_csswhich minifies CSS filescompile_scsswhich compiles SCSS files to CSSMinifying Javascript filesTo show the options of thetsantsa_jscommand, just type:$ python setup.py tsantsa_js --helpYou should obtain something like this:Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package

Global options:
  --verbose (-v)  run verbosely (default)
  --quiet (-q)    run quietly (turns verbosity off)
  --dry-run (-n)  don't actually do anything
  --help (-h)     show detailed help message
  --no-user-cfg   ignore pydistutils.cfg in your home directory

Options for 'tsantsa_js' command:
  --sources                sources files
  --output                 minified output filename. If you provide a template
                           output filename (e.g. "static/%s-min.ext"), the
                           source files will be minified individually
  --mangle                 mangle names

usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --helpThetsantsa_jstool can be used on the command-line. Here is an example:$ python setup.py tsantsa_js --sources static/*.js --output static/combined.jsBut, the most useful way to usetsantsa_jsis via asetup.cfgfile
located in your project root directory (that is, next to thesetup.pyfile):[tsantsa_js]
sources = static/one.js static/two.js
output = static/combined.js
mangle = yesThen, we you run thetsantsa_jscommand, the command options will be read
from thesetup.cfgfile in addition to the command-line arguments.Note that, since there’s a single output file for many sources, the
sources files are merged into a single file which is compressed to
produce a single minified file.However, you may want to compress the sources files individually and obtain
distinct minified files. In that case, you should provide a template output
filename instead of a regular output filename. A template output filename is a
filename with a%sin it, which will be substituted by the current source
name being processed. For example:[tsantsa_js]
sources = static/one.js static/two.js
output = static/%s-min.jsRunningpython setup.py tsantsa_jswill then produce two minified files:static/one-min.jsandstatic/two-min.js.Minifying CSS filesYou can also see the options of thetsantsa_csscommand, by typing:$ python setup.py tsantsa_css --helpAnd here is the result:Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package

Global options:
  --verbose (-v)  run verbosely (default)
  --quiet (-q)    run quietly (turns verbosity off)
  --dry-run (-n)  don't actually do anything
  --help (-h)     show detailed help message
  --no-user-cfg   ignore pydistutils.cfg in your home directory

Options for 'tsantsa_css' command:
  --sources     sources files
  --output      minified output filename. If you provide a template output
                filename (e.g. "static/%s-min.ext"), the source files will be
                minified individually

usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --helpThis command can be used about the same way as thetsantsa_jscommand, but
it has less options.Combining minification operationsYou can also combine minification operations thanks to the builtinaliascommand (still specified in thesetup.cfgfile, but not available with pure distutils):[alias]
minify_each_css = tsantsa_css --sources static/*.css --output static/%s-min.css
minify_each_js = tsantsa_js --sources static/*.js --output static/%s-min.js
minify_each = minify_each_css minify_each_jsThen callminify_eachby typing:$ python setup.py minify_eachCompiling SCSS filesYou can also see the options of thecompile_scsscommand, by typing:$ python setup.py compile_scss --helpAnd here is the result:Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py install    will install the package

Global options:
  --verbose (-v)  run verbosely (default)
  --quiet (-q)    run quietly (turns verbosity off)
  --dry-run (-n)  don't actually do anything
  --help (-h)     show detailed help message
  --no-user-cfg   ignore pydistutils.cfg in your home directory

Options for 'compile_scss' command:
  --sources  sources files
  --output   compiled css output file

usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --helpSupportThis project is hosted onGithub.
Please report issues via the bug tracker.