Tsantsa: CSS, JS minification and SCSS compilation commands for setuptools release announcement

October 21, 2012 at 12:30 PM | categories: Python | View Comments

The Baruwa 2 project uses compass and coffee to generate css and javascript files, these files require minification to improve performance when deployed.

Baruwa is written in python so it is ideal that the compilation and minification takes place using setuptools when the package archive is created.

Python setuptools allows for plugin commands to be created for actions like this, i searched for existing projects that do css and js minification and found minify which uses the yui compressor from yahoo. Am not a fan of java so i decided to implement a minification tools plugin that would work using only pure python without external commands.

The result is Tsantsa which is based on the minify code base but uses cssmin for CSS and slimit for JS minification. It also adds compilation of SCSS code using the scss python package.

Using tsantsa the process of generating Baruwa 2 release tar balls has been simplified.

The package is available for download from PyPi as well as crate.io and the source code is available on github.

I have since spoken to the author of the minify package and we have agreed to work together to create a project that uses the best minification tools the user has installed on their system, doing what anyjson has done for json for minification.

blog comments powered by Disqus