{ "info": { "author": "Peter Bengtsson", "author_email": "mail@peterbe.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Programming Language :: Python :: 2", "Topic :: Software Development :: Build Tools", "Topic :: System :: Installation/Setup", "Topic :: System :: Systems Administration" ], "description": "grymt\n=====\n\n* [Means \"awesome\" in Swedish](http://en.wiktionary.org/wiki/grym#Swedish).\n\n* Analyzes and processes HTML for ideal hosting in production. All\nreferenced CSS and JS is minified and concatenated according to HTML\ncomments you put in your HTML file(s).\n\n* Input requires that all things to be analyzed is in one sub-directory.\n\n* Ultimately `grymt` is a solution to not being able to use\n [Grunt](http://gruntjs.com/) as\n desired. Grunt is a great framework but it's hard to get it to work exactly as\n you like. Individual Grunt \"recipes\" work, but not all together.\n\nDemo\n----\n\nAnd example app is [Buggy](https://github.com/peterbe/buggy). Compare\nthe [source](https://github.com/peterbe/buggy/blob/master/client/index.html)\nwith the output by viewing the HTML source on\n[buggy.peterbe.com](http://buggy.peterbe.com/).\n\nAlternatively, in this project root there is a full app called `exampleapp`.\nTry running,\n\n```\npython grymt.py exampleapp\n```\n\nNow inspect what was created in `./dist/`.\n\nHow to use it\n-------------\n\nFirst install it,\n\n```\npip install grymt\n```\n\nThen, make sure you have all your HTML, CSS and Javascript code in one\ndirectory. For example,\n\n```\nls app/\nindex.html partials static\n```\n\nThen,\n\n```\ngrymt app/\n```\n\nThat'll create a directory called `dist` which is a copy of `app` but with\nHTML, CSS and JS optimized.\n\nThere are a growing list of options under,\n\n```\ngrymt --help\n```\n\nLicense\n-------\n\n[Mozilla Public License 2.0](http://www.mozilla.org/MPL/2.0/)\n\nCopyright: Peter Bengtsson\n\nCool features\n-------------\n\n* You can use hashes. For example,\n\n```html\n\n\n\n\n```\n\nthen you get a file called `95afdee.min.js` where the hash is a\nchecksum on the files' combined content.\n\n* You can inline your CSS or your JS instead of making it an external\n file. For example,\n\n```html\n
\n\n\n\n\n\n```\n\ncan become:\n\n```html\n\n\n```\n\nwhich is, depending on circumstances, a good web performance optimization trick\nbecause you reduce the number of dependencies on external resources and\nmakes it easier for the browser to start rendering stuff to the screen sooner.\n\n* Files like `somelib.min.js` or `someframework-min.css` doesn't get minimized\nagain.\n\n* You can put `$git_revision` (or `$git_revision_short`) anywhere in your\nHTML that gets converted to the current git HEAD sha.\n\n* All images referenced in CSS gets unique and nice names that makes it\npossible to set far-future cache headers on them.\n\n* You can set HTML to be removed. This example demonstrates it well:\n\n```html\n\n\n\n\n```\n\nThat makes it so that `window.DEBUG` is `false` when in production.\n\n* It's fast.\n\n* You can use include files that thus only get inserted in the built code.\nFor example:\n\n```html\n\n\n\n```\n\n\nAbout --git-revision\n--------------------\n\nIf you put something like `$git_revision` or `$git_revision_short` in your\nhtml, grymt will automatically execute a shell command of `git rev-parse HEAD`.\nBut this might not work if your copy of the files (that you're running grymt\non) isn't in a git repository.\n\nSo, the solution is instead to supply it on the command line like this:\n```\ngrymt --git-revision e30a0a52f6f5223ec043056a55d05aa53d33b508 ./somedirectory\n```\n\n\nUglifyjs instead of jsmin\n-------------------------\n\nThe advantage of `jsmin` is that it's really easy to install and use\nand it's in Python.\n\nThe advantage of `uglifyjs` is that it's much better at optimizing the\nJavascript code.\n\nBy default, `grymt` tries to use `uglifyjs` on the command line and if\nit's not available or executable, it falls back on `jsmin`.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/peterbe/grymt", "keywords": "grymt", "license": "MPL2", "maintainer": "", "maintainer_email": "", "name": "grymt", "package_url": "https://pypi.org/project/grymt/", "platform": "", "project_url": "https://pypi.org/project/grymt/", "project_urls": { "Homepage": "https://github.com/peterbe/grymt" }, "release_url": "https://pypi.org/project/grymt/1.5/", "requires_dist": null, "requires_python": "", "summary": "Preps a set of HTML files for deployment", "version": "1.5" }, "last_serial": 4257878, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "002d4566dbf9fc55f45e6696191c1762", "sha256": "8a6ed1231fdfe8e0837fbc57420f7dab41bce10ddea31c986e7421c27b9033bb" }, "downloads": -1, "filename": "grymt-0.1.tar.gz", "has_sig": false, "md5_digest": "002d4566dbf9fc55f45e6696191c1762", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12810, "upload_time": "2014-03-31T22:31:22", "url": "https://files.pythonhosted.org/packages/bb/21/8f14de24049f155fd0b2b7a485e585be4b4e55b3e176dab6db2ec51dddab/grymt-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "9a1a788c1da4f3107ab35e0fa20327e8", "sha256": "23f43633fa91869d18d27b415663b77b98a27b61a7d6d915c6888bdc496c1339" }, "downloads": -1, "filename": "grymt-0.2.tar.gz", "has_sig": false, "md5_digest": "9a1a788c1da4f3107ab35e0fa20327e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12832, "upload_time": "2014-03-31T22:52:41", "url": "https://files.pythonhosted.org/packages/87/49/aa9f21de968f3f08f622e6dc056f545378d45a520187b3cd9755a6a8f317/grymt-0.2.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "1c58f1f748c72b13c5b7c576c94ab567", "sha256": "7dfb3c10cb077133563f4e9e59455f804a44a25c916220d7225d7a84d1e59e2b" }, "downloads": -1, "filename": "grymt-0.4.tar.gz", "has_sig": false, "md5_digest": "1c58f1f748c72b13c5b7c576c94ab567", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12929, "upload_time": "2014-04-01T16:23:18", "url": "https://files.pythonhosted.org/packages/46/58/6b398f2544e88b3a8fb169645d4497a70c0d1990e31ce8efa0f5a33512c4/grymt-0.4.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "9527542947fb5965b3040b72481d4f5d", "sha256": "b13940da90295240f19f5940e74ad0d52d767f8cfcd2fcb08deff87773d64947" }, "downloads": -1, "filename": "grymt-1.0.tar.gz", "has_sig": false, "md5_digest": "9527542947fb5965b3040b72481d4f5d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12922, "upload_time": "2014-04-04T04:04:38", "url": "https://files.pythonhosted.org/packages/90/92/1c3cedffd89dba1e7b30c941297c688b13cea290e384283a731f3f0f3eae/grymt-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "06cb6bb111858b6e4dc42c775e4f1341", "sha256": "45f7e283420229e2117de48c4e6986269be6c6a19c7f60e36140700e93b179af" }, "downloads": -1, "filename": "grymt-1.1.tar.gz", "has_sig": false, "md5_digest": "06cb6bb111858b6e4dc42c775e4f1341", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13450, "upload_time": "2014-04-21T18:31:02", "url": "https://files.pythonhosted.org/packages/4a/28/ae2653364f91a6d264ff8d468ac4c018305a1c0d996d2e0ca521f4c12942/grymt-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "14fe1907715ceec5d4be7e1ae3794b53", "sha256": "2846726d03b2bee37bb05c3fa38f48059fc1dadea250e3e2501e8e7e8b1d4ff2" }, "downloads": -1, "filename": "grymt-1.2.tar.gz", "has_sig": false, "md5_digest": "14fe1907715ceec5d4be7e1ae3794b53", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13870, "upload_time": "2014-04-26T16:55:58", "url": "https://files.pythonhosted.org/packages/43/59/53949a3a863f6da46373bf0911085fb9d243cd1c17615572eb4a2888f632/grymt-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "ecde252d088dbede925a484be4402fb3", "sha256": "4c8bd8509644c3fd70726eaaa891fb302c6dbbdcede71003031c0d760a49c292" }, "downloads": -1, "filename": "grymt-1.3.tar.gz", "has_sig": false, "md5_digest": "ecde252d088dbede925a484be4402fb3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14134, "upload_time": "2014-05-13T21:05:13", "url": "https://files.pythonhosted.org/packages/67/2f/baf2e6cb369c4388789a6f9d25f7eb23413db97756880b96d4c6ef4ea058/grymt-1.3.tar.gz" } ], "1.4": [ { "comment_text": "", "digests": { "md5": "507c4ed5f69a61133728c8ceca9e0669", "sha256": "81f529f066087ed558fbbbeb9983f56bb4c705945e3439af68ecc31ba0ebd680" }, "downloads": -1, "filename": "grymt-1.4.tar.gz", "has_sig": false, "md5_digest": "507c4ed5f69a61133728c8ceca9e0669", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14146, "upload_time": "2014-07-22T04:18:52", "url": "https://files.pythonhosted.org/packages/b7/ec/df4816560f2371d934d494b7d41ff5e97af2c83f0df4397305ac62a519a1/grymt-1.4.tar.gz" } ], "1.5": [ { "comment_text": "", "digests": { "md5": "99abb0a5ba699acae47a1b3b364ad32d", "sha256": "971f724e9bed8e52ed2340aaea4ea78d8aed9c5c83cd457bbed3a174481380b7" }, "downloads": -1, "filename": "grymt-1.5.tar.gz", "has_sig": false, "md5_digest": "99abb0a5ba699acae47a1b3b364ad32d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12693, "upload_time": "2018-09-10T14:21:50", "url": "https://files.pythonhosted.org/packages/39/7c/51cf7d7c91b1d3cfc401ef80cc3a8d768d5e167150b6b995b8f8c082e53c/grymt-1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "99abb0a5ba699acae47a1b3b364ad32d", "sha256": "971f724e9bed8e52ed2340aaea4ea78d8aed9c5c83cd457bbed3a174481380b7" }, "downloads": -1, "filename": "grymt-1.5.tar.gz", "has_sig": false, "md5_digest": "99abb0a5ba699acae47a1b3b364ad32d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12693, "upload_time": "2018-09-10T14:21:50", "url": "https://files.pythonhosted.org/packages/39/7c/51cf7d7c91b1d3cfc401ef80cc3a8d768d5e167150b6b995b8f8c082e53c/grymt-1.5.tar.gz" } ] }