{ "info": { "author": "Simone Marzola", "author_email": "simone.marzola@axant.it", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: TurboGears", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "About tgext.minify\n-------------------------\n\ntgext.minify is a Turbogears 2 middleware that automatically minifies your javascript\nand CSS and cache it. It's able to obfuscate your js too.\nCSS minifier based on rCSSmin by Andr\u00e9 Malo.\nJS minifier/obfuscator based on `SlimIt `_ by Ruslan Spivak\nThe middleware is based on `tgext.scss `_ by Alessandro Molina\n\nInstalling\n-------------------------------\n\ntgext.scss can be installed both from pypi or from bitbucket::\n\n easy_install tgext.minify\n\nshould just work for most of the users\n\nEnabling tgext.minify\n----------------------------------\n\nIf tgext.pluggable is available enabling tgext.minify is just a matter of appending to your ``config/app_cfg.py``::\n\n from tgext.pluggable import plug\n plug(base_config, 'tgext.minify')\n\nOtherwise manually using tgext.minify is really simple, you edit your ``config/middeware.py`` and just after\nthe ``#Wrap your base TurboGears 2 application with custom middleware here`` comment wrap\n``app`` with ``MinifyMiddleware``::\n\n from tgext.minify import MinifyMiddleware\n\n make_base_app = base_config.setup_tg_wsgi_app(load_environment)\n\n def make_app(global_conf, full_stack=True, **app_conf):\n app = make_base_app(global_conf, full_stack=True, **app_conf)\n\n # Wrap your base TurboGears 2 application with custom middleware here\n app = MinifyMiddleware(app)\n \n return app\n\n\nNow you just have to put your beautiful .css and .js files inside *public/* and they will be served as minified.\n\nJS obfuscation\n---------------\n\nIf you need to obfuscate your javascript, just add ``mangle_js = true`` to your ``development.ini``.\nIf you want to obfuscate also the global scope, add ``mangle_js_toplevel = true``. Keep in mind that\nif you obfuscate your js, you have to join js files that depends on each other, or the namespace will\nbe messed up.\n\nPerformance boost\n-----------------------------------\n\nHere is the report of a benchmark made on paster serving bootstrap.css with and without the middleware\nand then bootstrap.min.js already minified (without using the middleware)::\n\n $ /usr/sbin/ab -n 1000 http://localhost:8080/css/bootstrap.css\n Requests per second: 1135.50 [#/sec] (mean)\n\n $ /usr/sbin/ab -n 1000 http://localhost:8080/css/bootstrap.css\n Requests per second: 714.99 [#/sec] (mean)\n\n $ /usr/sbin/ab -n 1000 http://localhost:8080/css/bootstrap.min.css\n Requests per second: 806.26 [#/sec] (mean)\n\nIn these case serving the unminified css using tgext.minify is even faster\nthan directly serving the same css file as it is served from memory\n(due to caching performed by tgext.minify).", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://bitbucket.org/simock85/tgext.minify", "keywords": "turbogears2.extension CSS JS minify obfuscate mangle WSGI", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "tgext.minify", "package_url": "https://pypi.org/project/tgext.minify/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/tgext.minify/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://bitbucket.org/simock85/tgext.minify" }, "release_url": "https://pypi.org/project/tgext.minify/0.0.2/", "requires_dist": null, "requires_python": null, "summary": "CSS and JS minifier / obfuscator for TurboGears 2", "version": "0.0.2" }, "last_serial": 800531, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "4693cdbb0a7afc273850aa571fd4e2a7", "sha256": "e61aa2b9f786efc0695a22198d4879702579ca4dc2963c6040e0394a6ccbf742" }, "downloads": -1, "filename": "tgext.minify-0.0.1.tar.gz", "has_sig": false, "md5_digest": "4693cdbb0a7afc273850aa571fd4e2a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10599, "upload_time": "2012-06-01T02:02:32", "url": "https://files.pythonhosted.org/packages/69/82/58e777547d2d155d2b74d91c0bf585ffd5eec628e6cccac6ae04f05ea7a3/tgext.minify-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "9cc792ef0f8ac0c4ed0354aab7e83d36", "sha256": "9093517e0f9cd79fdd382694459f8b778991598f1cbb3e168937fbbb7d4cbf70" }, "downloads": -1, "filename": "tgext.minify-0.0.2.tar.gz", "has_sig": false, "md5_digest": "9cc792ef0f8ac0c4ed0354aab7e83d36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7434, "upload_time": "2012-06-01T23:19:51", "url": "https://files.pythonhosted.org/packages/5d/1d/25457df1b0f2fcdc54e5bba346c073a0fd728ea9ad33d409d143e94abc19/tgext.minify-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9cc792ef0f8ac0c4ed0354aab7e83d36", "sha256": "9093517e0f9cd79fdd382694459f8b778991598f1cbb3e168937fbbb7d4cbf70" }, "downloads": -1, "filename": "tgext.minify-0.0.2.tar.gz", "has_sig": false, "md5_digest": "9cc792ef0f8ac0c4ed0354aab7e83d36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7434, "upload_time": "2012-06-01T23:19:51", "url": "https://files.pythonhosted.org/packages/5d/1d/25457df1b0f2fcdc54e5bba346c073a0fd728ea9ad33d409d143e94abc19/tgext.minify-0.0.2.tar.gz" } ] }