{ "info": { "author": "Andrew Colin Kissa", "author_email": "andrew@topdog.za.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Site Management" ], "description": "=======\nTsantsa\n=======\n\nTsantsa provides setuptools commands for minifying CSS and JS resources and\ncompilation of SCSS resources to CSS using `cssmin`_, `slimit`_ and `scss`_.\n\nscss, cssmin and slimit are pure Python packages and do not require any external commands.\n\nThis package is inspired by and based on the minify package by Sylvain Prat which uses the\n`YUI compressor`_ from Yahoo! Inc.\n\nWhen you install ``tsantsa``, three new commands are available:\n\n- ``tsantsa_js`` which minifies Javascript files\n- ``tsantsa_css`` which minifies CSS files\n- ``compile_scss`` which compiles SCSS files to CSS\n\nSee the Usage_ section for more information about these commands.\n\n.. _`YUI compressor`: http://developer.yahoo.com/yui/compressor/\n.. _`cssmin`: https://github.com/zacharyvoase/cssmin\n.. _`slimit`: http://slimit.org/\n.. _`scss`: http://packages.python.org/scss/\n\nInstallation\n============\n\nThe Tsantsa commands are meant to be used in an existing python project. So, in\norder to make the commands available in your project, just add ``tsantsa`` to\nthe requirements of your project, for example::\n\n setup(\n ...\n install_requires=['tsantsa'],\n ...\n )\n\nThen, when you install your package, the Tsantsa commands will be available.\n\n\nUsage\n=====\n\n.. _Usage:\n\n\nTsantsa provides commands for minifying CSS and JS resources and compiling SCSS\nresources:\n\n- ``tsantsa_js`` which minifies Javascript files\n- ``tsantsa_css`` which minifies CSS files\n- ``compile_scss`` which compiles SCSS files to CSS\n\n\nMinifying Javascript files\n--------------------------\n\nTo show the options of the ``tsantsa_js`` command, just type::\n\n $ python setup.py tsantsa_js --help\n\n\nYou should obtain something like this::\n\n Common commands: (see '--help-commands' for more)\n \n setup.py build will build the package underneath 'build/'\n setup.py install will install the package\n \n Global options:\n --verbose (-v) run verbosely (default)\n --quiet (-q) run quietly (turns verbosity off)\n --dry-run (-n) don't actually do anything\n --help (-h) show detailed help message\n --no-user-cfg ignore pydistutils.cfg in your home directory\n \n Options for 'tsantsa_js' command:\n --sources sources files\n --output minified output filename. If you provide a template\n output filename (e.g. \"static/%s-min.ext\"), the\n source files will be minified individually\n --mangle mangle names\n \n usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]\n or: setup.py --help [cmd1 cmd2 ...]\n or: setup.py --help-commands\n or: setup.py cmd --help\n\nThe ``tsantsa_js`` tool can be used on the command-line. Here is an example::\n\n $ python setup.py tsantsa_js --sources static/*.js --output static/combined.js\n\n\nBut, the most useful way to use ``tsantsa_js`` is via a ``setup.cfg`` file\nlocated in your project root directory (that is, next to the ``setup.py``\nfile)::\n\n [tsantsa_js]\n sources = static/one.js static/two.js\n output = static/combined.js\n mangle = yes\n\nThen, we you run the ``tsantsa_js`` command, the command options will be read\nfrom the ``setup.cfg`` file in addition to the command-line arguments.\n\nNote that, since there's a single output file for many sources, the\nsources files are merged into a single file which is compressed to\nproduce a single minified file.\n\nHowever, you may want to compress the sources files individually and obtain\ndistinct minified files. In that case, you should provide a template output\nfilename instead of a regular output filename. A template output filename is a\nfilename with a ``%s`` in it, which will be substituted by the current source\nname being processed. For example::\n\n [tsantsa_js]\n sources = static/one.js static/two.js\n output = static/%s-min.js\n\nRunning ``python setup.py tsantsa_js`` will then produce two minified files:\n``static/one-min.js`` and ``static/two-min.js``.\n\n\nMinifying CSS files\n-------------------\n\nYou can also see the options of the ``tsantsa_css`` command, by typing::\n\n $ python setup.py tsantsa_css --help\n\nAnd here is the result::\n\n Common commands: (see '--help-commands' for more)\n \n setup.py build will build the package underneath 'build/'\n setup.py install will install the package\n \n Global options:\n --verbose (-v) run verbosely (default)\n --quiet (-q) run quietly (turns verbosity off)\n --dry-run (-n) don't actually do anything\n --help (-h) show detailed help message\n --no-user-cfg ignore pydistutils.cfg in your home directory\n \n Options for 'tsantsa_css' command:\n --sources sources files\n --output minified output filename. If you provide a template output\n filename (e.g. \"static/%s-min.ext\"), the source files will be\n minified individually\n \n usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]\n or: setup.py --help [cmd1 cmd2 ...]\n or: setup.py --help-commands\n or: setup.py cmd --help\n\nThis command can be used about the same way as the ``tsantsa_js`` command, but\nit has less options.\n\n\nCombining minification operations\n---------------------------------\n\nYou can also combine minification operations thanks to the builtin ``alias``\ncommand (still specified in the ``setup.cfg`` file, but not available with pure distutils)::\n\n [alias]\n minify_each_css = tsantsa_css --sources static/*.css --output static/%s-min.css\n minify_each_js = tsantsa_js --sources static/*.js --output static/%s-min.js\n minify_each = minify_each_css minify_each_js\n\nThen call ``minify_each`` by typing:: \n \n $ python setup.py minify_each\n\n\nCompiling SCSS files\n--------------------\n\nYou can also see the options of the ``compile_scss`` command, by typing::\n\n $ python setup.py compile_scss --help\n\nAnd here is the result::\n\n\tCommon commands: (see '--help-commands' for more)\n\n\t setup.py build will build the package underneath 'build/'\n\t setup.py install will install the package\n\n\tGlobal options:\n\t --verbose (-v) run verbosely (default)\n\t --quiet (-q) run quietly (turns verbosity off)\n\t --dry-run (-n) don't actually do anything\n\t --help (-h) show detailed help message\n\t --no-user-cfg ignore pydistutils.cfg in your home directory\n\n\tOptions for 'compile_scss' command:\n\t --sources sources files\n\t --output compiled css output file\n\n\tusage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]\n\t or: setup.py --help [cmd1 cmd2 ...]\n\t or: setup.py --help-commands\n\t or: setup.py cmd --help\n\nSupport\n=======\n\nThis project is hosted on `Github\n`__.\nPlease report issues via the bug tracker.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.topdog.za.net/tsantsa", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "tsantsa", "package_url": "https://pypi.org/project/tsantsa/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/tsantsa/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.topdog.za.net/tsantsa" }, "release_url": "https://pypi.org/project/tsantsa/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "Tsantsa: CSS, JS minification and SCSS compilation commands for setuptools", "version": "0.0.1" }, "last_serial": 800980, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "d00e07a2e1b31c367c9231fb6cc57e78", "sha256": "ff9407c727947c51ee1424905cf1d5a01a5c47aade755ed1e8a9209f249a60ed" }, "downloads": -1, "filename": "tsantsa-0.0.1.tar.bz2", "has_sig": false, "md5_digest": "d00e07a2e1b31c367c9231fb6cc57e78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7390, "upload_time": "2012-10-17T14:09:06", "url": "https://files.pythonhosted.org/packages/81/6e/4f2867114e3aa7e3a20703c42f74a48c14304343773a66331a222b2f91fa/tsantsa-0.0.1.tar.bz2" }, { "comment_text": "", "digests": { "md5": "ca54f7dfbfee9ed3b7b67a455867cf91", "sha256": "de2d94249ecb0ddc2112d3ba776589ebba8c918a409ff4f0ce2a4c420e0ca47f" }, "downloads": -1, "filename": "tsantsa-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ca54f7dfbfee9ed3b7b67a455867cf91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7424, "upload_time": "2012-10-17T14:09:14", "url": "https://files.pythonhosted.org/packages/97/cc/2d43b61c8a50b820fa436a169337c619be810e8e2072eebd6f54c30d3070/tsantsa-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d00e07a2e1b31c367c9231fb6cc57e78", "sha256": "ff9407c727947c51ee1424905cf1d5a01a5c47aade755ed1e8a9209f249a60ed" }, "downloads": -1, "filename": "tsantsa-0.0.1.tar.bz2", "has_sig": false, "md5_digest": "d00e07a2e1b31c367c9231fb6cc57e78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7390, "upload_time": "2012-10-17T14:09:06", "url": "https://files.pythonhosted.org/packages/81/6e/4f2867114e3aa7e3a20703c42f74a48c14304343773a66331a222b2f91fa/tsantsa-0.0.1.tar.bz2" }, { "comment_text": "", "digests": { "md5": "ca54f7dfbfee9ed3b7b67a455867cf91", "sha256": "de2d94249ecb0ddc2112d3ba776589ebba8c918a409ff4f0ce2a4c420e0ca47f" }, "downloads": -1, "filename": "tsantsa-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ca54f7dfbfee9ed3b7b67a455867cf91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7424, "upload_time": "2012-10-17T14:09:14", "url": "https://files.pythonhosted.org/packages/97/cc/2d43b61c8a50b820fa436a169337c619be810e8e2072eebd6f54c30d3070/tsantsa-0.0.1.tar.gz" } ] }