{ "info": { "author": "Sylvain Prat", "author_email": "sylvain.prat+minify@gmail.com", "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": "======\nMinify\n======\n\nMinify provides distutils/setuptools commands for minifying CSS and JS resources using\nthe well-known `YUI compressor`_ from Yahoo! Inc. When you install ``minify``, two\nnew commands are available:\n\n- ``minify_js`` which minifies Javascript files\n- ``minify_css`` which minifies CSS files\n\nSee the Usage_ section for more information about these commands.\n\n\n.. _`YUI compressor`: http://developer.yahoo.com/yui/compressor/\n\n\nInstallation\n============\n\nThe Minify commands are meant to be used in an existing python project. So, in\norder to make the commands available in your project, just add ``minify`` to\nthe requirements of your project, for example::\n\n setup(\n ...\n install_requires=['minify'],\n ...\n )\n\nThen, when you install your package, the minify commands will be available.\n\nAlso, since the YUI compressor tool is written in Java, you should have a Java\nvirtual machine installed on your system and available in your system ``PATH``.\n\nMinify can also be used in a pure distutils environment, but note that the\npackage using the minification functionality should use a ``cmdclass`` parameter\nin its setup script, like this::\n\n setup(\n ...\n cmdclass={\n 'minify_js': minify.command.minify_js,\n 'minify_css': minify.command.minify_css\n },\n ...\n )\n\n\nUsage\n=====\n\n.. _Usage:\n\n\nMinify provides two commands for minifying CSS and JS resources:\n\n- ``minify_js`` which minifies Javascript files\n- ``minify_css`` which minifies CSS files\n\n\nMinifying Javascript files\n--------------------------\n\nTo show the options of the ``minify_js`` command, just type::\n\n $ python setup.py minify_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 'minify_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 --charset Read the input file(s) using \n --line-break Insert a line break after the specified column\n number\n --nomunge Minify only, do not obfuscate\n --preserve-semi Preserve all semicolons\n --disable-optimizations Disable all micro optimizations\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 ``minify_js`` tool can be used on the command-line. Here is an example::\n\n $ python setup.py minify_js --sources static/*.js --output static/combined.js\n\n\nBut, the most useful way to use ``minify_js`` is via a ``setup.cfg`` file\nlocated in your project root directory (that is, next to the ``setup.py``\nfile)::\n\n [minify_js]\n sources = static/one.js static/two.js\n output = static/combined.js\n nomunge = yes\n\nThen, we you run the ``minify_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 with the YUI\ncompressor in order to produce 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 substitued by the current source\nname being processed. For example::\n\n [minify_js]\n sources = static/one.js static/two.js\n output = static/%s-min.js\n\nRunning ``python setup.py minify_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 ``minify_css`` command, by typing::\n\n $ python setup.py minify_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 'minify_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 --charset Read the input file(s) using \n --line-break Insert a line break after the specified column number\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 ``minify_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 = minify_css --sources static/*.css --output static/%s-min.css --charset utf-8\n minify_each_js = minify_js --sources static/*.js --output static/%s-min.js --charset utf-8\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\nSupport\n=======\n\nThis project is hosted on `bitbucket.org\n`__.\nPlease report issues via the bug tracker.\n\n\nChangelog\n=========\n\n0.1.4 (24-September-2013)\n-------------------------\n\n* Added support for Python 2.6. Thanks Mateusz Shirkey!\n\n\n0.1.3 (03-May-2012)\n-------------------\n\n* Pure distutils compatibility\n\n\n0.1.2 (20-April-2012)\n---------------------\n\n* Fixed issue #2: the sources where processed out of order, which caused problems when evaluating\n CSS rules, ...\n\n\n0.1.1 (16-March-2012)\n---------------------\n\n* Fixed issue #1: improved the documentation, explained that minify requires setuptools to\n install.\n\n\n0.1.0 (10-March-2012)\n---------------------\n\n* Initial release", "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/sprat/minify", "keywords": "minify,css,javascript,js,distutils,setuptools,command,setup.cfg", "license": "MIT License", "maintainer": null, "maintainer_email": null, "name": "minify", "package_url": "https://pypi.org/project/minify/", "platform": "any", "project_url": "https://pypi.org/project/minify/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://bitbucket.org/sprat/minify" }, "release_url": "https://pypi.org/project/minify/0.1.4/", "requires_dist": null, "requires_python": null, "summary": "Minify provides distutils/setuptools commands for minifying CSS and JS resources", "version": "0.1.4" }, "last_serial": 873020, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a313f6c0fca9fa9b53a1186a8ef57b1c", "sha256": "84d2cdbb2073ff78f3cd32c6398a98c1edf2930cee9eb9348131986dccae475b" }, "downloads": -1, "filename": "minify-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a313f6c0fca9fa9b53a1186a8ef57b1c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7003, "upload_time": "2012-03-10T21:43:08", "url": "https://files.pythonhosted.org/packages/a8/53/b7f502aae991eea792612034e22cff4c9ed68647d6cd683eef522586d30d/minify-0.1.0.tar.gz" }, { "comment_text": "", "digests": { "md5": "150c4f45d21e82e278bf315762f7d10b", "sha256": "8b2fa16664102f38c8bf069bedc588dc46831de7d91244d61f78f7ce363e87ea" }, "downloads": -1, "filename": "minify-0.1.0.zip", "has_sig": false, "md5_digest": "150c4f45d21e82e278bf315762f7d10b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13127, "upload_time": "2012-03-10T21:43:08", "url": "https://files.pythonhosted.org/packages/53/28/14cf4935b83e1f92024bf2bd16a2a1dd136d4484a5c5f98b9be6209e3049/minify-0.1.0.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "3101736593ebf53ebd30372342b1c558", "sha256": "109748315b377aebdbb8457f53be5628107d28337e9e9e5f8ed072605568adf4" }, "downloads": -1, "filename": "minify-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3101736593ebf53ebd30372342b1c558", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6905, "upload_time": "2012-03-16T10:40:18", "url": "https://files.pythonhosted.org/packages/9a/5c/d8176c8450ea037fd709211902a3b3a6c2568754fa188321182347376e83/minify-0.1.1.tar.gz" }, { "comment_text": "", "digests": { "md5": "5b3b07da9299dfd02e106817e2057ab9", "sha256": "c43b9d49468a49c14adff1c373a8b5ffb03ca974c34bc9daf618b06ba19e3ae3" }, "downloads": -1, "filename": "minify-0.1.1.zip", "has_sig": false, "md5_digest": "5b3b07da9299dfd02e106817e2057ab9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13367, "upload_time": "2012-03-16T10:40:17", "url": "https://files.pythonhosted.org/packages/98/be/725e3bb0e17654695ce369fa34a1b7e3717cd75886271af73e3a0e367b3a/minify-0.1.1.zip" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b317e2b94652fccdbd0d0328f310c99a", "sha256": "65d6f2346cb499b8a9f7df6dd0c422fee12b0533117e63f58e1038c5b32184ac" }, "downloads": -1, "filename": "minify-0.1.2.tar.gz", "has_sig": false, "md5_digest": "b317e2b94652fccdbd0d0328f310c99a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7137, "upload_time": "2012-04-20T14:50:28", "url": "https://files.pythonhosted.org/packages/dc/02/743f46e66f1d8a7ca30b6d6ff524e4412d2fac77180cd06863c589d38ff4/minify-0.1.2.tar.gz" }, { "comment_text": "", "digests": { "md5": "623be27317efd21ade822bce0b16bda2", "sha256": "e2806844a4d34bcffdcbda488940086caa2a3c0ad82b6c541b5c85f28e41d547" }, "downloads": -1, "filename": "minify-0.1.2.zip", "has_sig": false, "md5_digest": "623be27317efd21ade822bce0b16bda2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13720, "upload_time": "2012-04-20T14:50:27", "url": "https://files.pythonhosted.org/packages/7a/20/e6e81252ddb68a5ee663571e36e98b3f304b91de157edce67297743ee0d8/minify-0.1.2.zip" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "e100109f25ee3cbf7f503add7478e28f", "sha256": "1c4aa86ca032b6a1b7cae09d7c999d4062eb1173dc45a63ee10021d449e66e85" }, "downloads": -1, "filename": "minify-0.1.3.tar.gz", "has_sig": false, "md5_digest": "e100109f25ee3cbf7f503add7478e28f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8098, "upload_time": "2012-05-03T09:49:55", "url": "https://files.pythonhosted.org/packages/cf/c6/3d2aac4889e675f65d7eb3e62590e5842dca6893f31c16b357d911569713/minify-0.1.3.tar.gz" }, { "comment_text": "", "digests": { "md5": "df333b82b9b6f1ab05c0af980833616e", "sha256": "fa8b8dcb5c3c2c361fbe236463b4c5910b31109b154d1b511504e273b59711d3" }, "downloads": -1, "filename": "minify-0.1.3.zip", "has_sig": false, "md5_digest": "df333b82b9b6f1ab05c0af980833616e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14285, "upload_time": "2012-05-03T09:49:54", "url": "https://files.pythonhosted.org/packages/94/95/acecccfb739a17bf19e53961c2dacd6d819ecdd618d909732d54ed0ca2da/minify-0.1.3.zip" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "70956aaeff48bbcebd706de37643826b", "sha256": "388ce07a2f3d448cce12a0134b565a7bee0acd76836a9207d34651f453e85f65" }, "downloads": -1, "filename": "minify-0.1.4.tar.gz", "has_sig": false, "md5_digest": "70956aaeff48bbcebd706de37643826b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7824, "upload_time": "2013-09-24T17:43:49", "url": "https://files.pythonhosted.org/packages/c3/ef/754731014f59409fd0c8bbf773700821f1e234bc6acf7eb0a46ed9b3d88a/minify-0.1.4.tar.gz" }, { "comment_text": "", "digests": { "md5": "42ec37cce1cb64d5135af04dfab35f82", "sha256": "b929a167d01f32846587be8f5bcd08883a3b619d79d6c8997693261040ebcad2" }, "downloads": -1, "filename": "minify-0.1.4.zip", "has_sig": false, "md5_digest": "42ec37cce1cb64d5135af04dfab35f82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14525, "upload_time": "2013-09-24T17:43:47", "url": "https://files.pythonhosted.org/packages/e3/19/7450347fe43b738f043724f6dc4fbf172963658bfff7190895001421f536/minify-0.1.4.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "70956aaeff48bbcebd706de37643826b", "sha256": "388ce07a2f3d448cce12a0134b565a7bee0acd76836a9207d34651f453e85f65" }, "downloads": -1, "filename": "minify-0.1.4.tar.gz", "has_sig": false, "md5_digest": "70956aaeff48bbcebd706de37643826b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7824, "upload_time": "2013-09-24T17:43:49", "url": "https://files.pythonhosted.org/packages/c3/ef/754731014f59409fd0c8bbf773700821f1e234bc6acf7eb0a46ed9b3d88a/minify-0.1.4.tar.gz" }, { "comment_text": "", "digests": { "md5": "42ec37cce1cb64d5135af04dfab35f82", "sha256": "b929a167d01f32846587be8f5bcd08883a3b619d79d6c8997693261040ebcad2" }, "downloads": -1, "filename": "minify-0.1.4.zip", "has_sig": false, "md5_digest": "42ec37cce1cb64d5135af04dfab35f82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14525, "upload_time": "2013-09-24T17:43:47", "url": "https://files.pythonhosted.org/packages/e3/19/7450347fe43b738f043724f6dc4fbf172963658bfff7190895001421f536/minify-0.1.4.zip" } ] }