{ "info": { "author": "Counsyl", "author_email": "opensource@counsyl.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Pre-processors" ], "description": "Civet\n=====\n\n![alt text](http://upload.wikimedia.org/wikipedia/commons/2/28/Luwak-Katze_in_Kepahiang.jpg \"Civet\")\n\n(Picture credit: [Leendertz](http://en.wikipedia.org/wiki/Kopi_Luwak#mediaviewer/File:Luwak-Katze_in_Kepahiang.jpg))\n\nCivet precompiles asset files (such as Sass, CoffeeScript and ECMAScript 6) in\nyour Django project when you use the `runserver` command. It will also watch\nthe file changes for you. Therefore, you can edit your asset files and expect\n`runserver` to recompile those files upon save, just like it how restarts the\napp server when you make changes to your Python source code\n\n\nUsage\n-----\n\nIn your `settings.py`, add Civet to your `INSTALLED_APPS` setting.\nIn Django 1.6 and before, add it right after\n`django.contrib.staticfiles`. In Django 1.7 and later, add it\nbefore `django.contrib.staticfiles`:\n\n```python\nINSTALLED_APPS = (\n # ...\n # 'civet', # Uncomment for Django 1.7 and later\n 'django.contrib.staticfiles',\n # 'civet', # Uncomment for Django 1.6 and earlier\n # ...\n)\n```\n\nThen add a `CIVET_PRECOMPILED_ASSET_DIR` setting that tells Civet where to\nput the precompiled assets. For example:\n\n CIVET_PRECOMPILED_ASSET_DIR = os.path.join(BASE_DIR, 'precompiled_assets')\n\nThat's it. Once set up, each time you use `manage.py runserver`, Civet will\nfirst check to see if there are new Sass and CoffeeScript files that need\nprecompiling. It will also start watch for file changes.\n\n\nAsset Versions Supported\n----------------------------------------\n\nCivet is known to work with the following compilers:\n\n* Sass 3.2.5+ and Compass 0.12.2+\n* CoffeeScript 1.6.3+\n* Babel 6.3.17+\n\n\n\"But We Only Use Sass (or CoffeeScript)\"\n----------------------------------------\n\nYou can choose which compilers Civet uses (and add your own) via a setting:\n\n```python\nCIVET_COMPILER_CLASSES = (\n civet.compilers.es6.ES6Compiler,\n)\n```\n\n\nCustomizable Options\n--------------------\n\nBy default, Civet looks for `coffee`, `sass`, and `babel` in your `PATH`\nenvironment varible. If you want to use specific paths, you can put these in\nyour `settings.py`:\n\n # The paths here are just examples\n CIVET_COFFEE_BIN = '/opt/local/bin/coffee'\n CIVET_SASS_BIN = '/opt/local/bin/sass'\n CIVET_BABEL_BIN = '/opt/local/bin/babel'\n\nFor Sass, a lot of people use [Bundler](http://bundler.io/) to manage their\nRuby command-line tools. This can be especially useful if you also use\nlibaries like Compass and want to lock down their versions. Bundler requires\nyou to set up a `Gemfile`. To use Bundler to run Sass, add this in your\n`settings.py`:\n\n CIVET_BUNDLE_GEMFILE = '/some/where/Gemfile'\n\nPlease note that `CIVET_BUNDLE_GEMFILE` and `CIVET_SASS_BIN` must not be set\nat the same time. If both are set, Civet will raise an error. Also, by\ndefault, Civet looks for the tool `bundle` in your `PATH`. If you want to\nuse a specific path, set `CIVET_BUNDLE_BIN` in your `settings.py`.\n\nFinally, if you want to use additional CoffeeScript or Sass compiling options,\nadd these to your `settings.py`. Here are the default values Civet uses:\n\n CIVET_COFFEE_SCRIPT_ARGUMENTS = ('--compile', '--map')\n CIVET_SASS_ARGUMENTS = ()\n\nIf you want to, for example, use Compass with Sass, use:\n\n CIVET_SASS_ARGUMENTS = ('--compass',)\n\nYou can also define patterns (files or directories) for Civet to ignore by\nsetting:\n\n # As an exmaple, this will cause Civet to ignore files with 'coffee' in the\n # name or path.\n CIVET_IGNORE_PATTERNS = ['coffee']\n\nThis gets extended into the ignore_patterns list defined in\n`django.contrib.staticfiles.management.commands.collectstatic`.\n\nYou can also define staticfile directories you want Civet to ignore by setting:\n\n # This will cause Civet to ignore files located in 'bower_components' or\n # 'node_modules' even if those folders are included in STATICFILES_DIRS.\n CIVET_IGNORE_DIRS = ['bower_components', 'node_modules']\n\n\nThis is particularly useful when using a package manager such as [Bower](http://bower.io/)\nor [NPM](https://www.npmjs.com/). These managers often install packages that\ninclude their own build systems, configurations, and files that are incompatible\nwith how Civet compiles assets.\n\nFor ES6, you can specify the NODE_PATH used for babel by setting\n`CIVET_ES6_NODE_PATH`.\n\n\nRecompile Everything\n--------------------\n\nTo recompile everything, just quit the server, delete the entire\n`CIVET_PRECOMPILED_ASSET_DIR` directory, and use the `runserver` command\nagain.\n\n\nSample Project\n--------------\n\nWe have included a sample project in `testsite/` to demonstrate how Civet\nworks with Django.\n\n\nMotivation\n----------\n\nWe have developed Civet to solve the following problems:\n\n1. It is too cumbersome to ask all our developers to remember using\n `coffee -w` and `sass -w` every time they use `runserver`.\n\n2. We want our CoffeeScript and Sass assets to be precompiled. It makes no\n sense to compile them on the fly as we serve static assets. Plus, Sass\n files that have a lot of includes can take a long time to process.\n At one point we had a Sass file that took 6 seconds to compile. We don't\n want our developers to wait for 6 seconds every time they reload a page.\n\n3. Django's static file layout requires Sass and CoffeeScript to watch\n for separate directories. We simply can't have them watch the top-level\n directory and call it a day. It is very cumbersome, however, to have\n Sass compiler watch multiple directories, and the option for\n multi-directory watch simply doesn't exist in the CoffeeScript compiler.\n\n4. We have a lot of CoffeeScript files, and on OS X that number exceeds the\n default maximum number of files that node.js (on which the official\n CoffeeScript compiler is based on) can watch. (See\n [this issue](https://github.com/joyent/node/issues/2479) for details.)\n\n\nAbout the Name\n--------------\n\nCivet is \"a slender nocturnal carnivorous mammal\" (according to *New Oxford\nAmerican Dictionary*) that also produces\n[kopi luwak](http://en.wikipedia.org/wiki/Kopi_Luwak) by ingesting coffee\nbeans. I was looking for a cheeky (sassy) project name that has to do with\ncoffee, and this comes to mind. Disclaimer: I have no idea what kopi luwak\ntastes like, and no animal is harmed during the development of this plug-in.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/counsyl/civet", "keywords": null, "license": "Apache License 2.0", "maintainer": null, "maintainer_email": null, "name": "civet", "package_url": "https://pypi.org/project/civet/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/civet/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/counsyl/civet" }, "release_url": "https://pypi.org/project/civet/2.0.3/", "requires_dist": null, "requires_python": null, "summary": "CoffeeScript and Sass asset precompiler for the Django", "version": "2.0.3" }, "last_serial": 2971027, "releases": { "0.9.2": [ { "comment_text": "", "digests": { "md5": "8c0810fca95366790f4789ad37144e2e", "sha256": "7e0a60b97c6f1479946178f51f21e179ed96bb2e633fedbc3a4b56928f09a759" }, "downloads": -1, "filename": "civet-0.9.2.tar.gz", "has_sig": false, "md5_digest": "8c0810fca95366790f4789ad37144e2e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7932, "upload_time": "2014-06-20T18:36:43", "url": "https://files.pythonhosted.org/packages/6f/93/1be56391ecd6c8cebc65d7c438db04275c38d432d4e3f68790d1be92d1f4/civet-0.9.2.tar.gz" } ], "0.9.3": [ { "comment_text": "", "digests": { "md5": "daea82e3bd70a0a9ee5a27b0473c6e46", "sha256": "2c7337b30a8536a0c749d8bc1c6b1391b8be1b4beed2f3cd926383693c87f7a9" }, "downloads": -1, "filename": "civet-0.9.3.tar.gz", "has_sig": false, "md5_digest": "daea82e3bd70a0a9ee5a27b0473c6e46", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7940, "upload_time": "2014-07-29T04:29:09", "url": "https://files.pythonhosted.org/packages/4a/d7/c8738baeb4cfc0c35ef69229a6f3285806e28d74c1c3d96583f74f1c8c85/civet-0.9.3.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "3b2ad4bf4d6b5afa243bb6bf155cb5fe", "sha256": "2e35fb66bde5446de2e7103e4779c01f2ca52d0404284fd0d73a96019e0b2e82" }, "downloads": -1, "filename": "civet-1.0.0.tar.gz", "has_sig": false, "md5_digest": "3b2ad4bf4d6b5afa243bb6bf155cb5fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9763, "upload_time": "2014-09-17T19:34:46", "url": "https://files.pythonhosted.org/packages/f1/5b/150427dc5252b803735da086000c82ffd35cea556ae466c116e81a549968/civet-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "9467344f3e4a1a4e6a47ddce786cf995", "sha256": "5482ae8809be2838ca0440ef576b704138a06267dfd102ba28b9a514eebd3134" }, "downloads": -1, "filename": "civet-1.0.1.tar.gz", "has_sig": false, "md5_digest": "9467344f3e4a1a4e6a47ddce786cf995", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9766, "upload_time": "2014-10-09T01:50:45", "url": "https://files.pythonhosted.org/packages/70/4e/14ab07f3fbeb0794023518b93ba4b1b470216bd77e119e2698ca8917f135/civet-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "5aa99edb10beae711d9cc26e8a0de7f4", "sha256": "04e51bb556f44e04600bcde47cb87b0c700a82508d5d8f6fe16bf47fc7e5761f" }, "downloads": -1, "filename": "civet-1.1.0.tar.gz", "has_sig": false, "md5_digest": "5aa99edb10beae711d9cc26e8a0de7f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10063, "upload_time": "2015-01-21T21:46:44", "url": "https://files.pythonhosted.org/packages/50/7e/a8cc53209f34d04eafa1c53003d90914b1688a06f6a84cc3608d23b98a23/civet-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "306f8803c71c84f8bfbe4823eba1def4", "sha256": "e75f774d08ef168c326ace823c8d2db25a2a4c5191654a368d5a41ba983a258d" }, "downloads": -1, "filename": "civet-1.1.1.tar.gz", "has_sig": false, "md5_digest": "306f8803c71c84f8bfbe4823eba1def4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10211, "upload_time": "2015-02-05T08:01:14", "url": "https://files.pythonhosted.org/packages/ab/dc/71721b0ea94c167bce66b9e232a635ca2c6d7cc92c463af022dcc96ab812/civet-1.1.1.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "faf0a41c26d30a1ba1eaebfa0813b1cb", "sha256": "c213e032506ae9ea558ecee6698bd115a2ae2f5a61e93aff1fba77da93e00004" }, "downloads": -1, "filename": "civet-1.2.0.tar.gz", "has_sig": false, "md5_digest": "faf0a41c26d30a1ba1eaebfa0813b1cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10426, "upload_time": "2015-05-13T17:43:37", "url": "https://files.pythonhosted.org/packages/5d/37/2010d2b26ee611bf038acd8bec42802c838b90f41679253e8e2f28f9dc80/civet-1.2.0.tar.gz" } ], "2.0.0": [], "2.0.1": [ { "comment_text": "", "digests": { "md5": "409afc8b6d70010e7fb1323befa69446", "sha256": "5e517cc1996091cc0b72d78699c0be74df5c0019b5822f01b7343b5e717093af" }, "downloads": -1, "filename": "civet-2.0.1.tar.gz", "has_sig": true, "md5_digest": "409afc8b6d70010e7fb1323befa69446", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11919, "upload_time": "2016-01-05T22:06:30", "url": "https://files.pythonhosted.org/packages/56/73/5fe6d0678809b9a4679a6d8fed012919427e2620d1d2daf45414411c1ac8/civet-2.0.1.tar.gz" } ], "2.0.2": [ { "comment_text": "", "digests": { "md5": "78fe8b519572800a17a9b55c972607b4", "sha256": "407ecc825c0005b9869a199e1944cb81ae7b97b577df8617058bb2cc6c497907" }, "downloads": -1, "filename": "civet-2.0.2.tar.gz", "has_sig": true, "md5_digest": "78fe8b519572800a17a9b55c972607b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12029, "upload_time": "2016-01-08T20:55:51", "url": "https://files.pythonhosted.org/packages/49/88/7135f053c46016d35ba95a2b13284baebf491fbf628a24abeb0bee208956/civet-2.0.2.tar.gz" } ], "2.0.3": [ { "comment_text": "", "digests": { "md5": "bd9fa1a73454d2e0bb95cea8af2ebd22", "sha256": "d95ed7d9e1ceb8629f806a68c260bb66ced0cc845534b83e96cbea1ff0aedf4d" }, "downloads": -1, "filename": "civet-2.0.3.tar.gz", "has_sig": false, "md5_digest": "bd9fa1a73454d2e0bb95cea8af2ebd22", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12050, "upload_time": "2017-06-23T00:00:18", "url": "https://files.pythonhosted.org/packages/6d/f8/220eefe5ac9803d49f2df5d4fedd876fb210c6e525784c125740d4bda2f3/civet-2.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bd9fa1a73454d2e0bb95cea8af2ebd22", "sha256": "d95ed7d9e1ceb8629f806a68c260bb66ced0cc845534b83e96cbea1ff0aedf4d" }, "downloads": -1, "filename": "civet-2.0.3.tar.gz", "has_sig": false, "md5_digest": "bd9fa1a73454d2e0bb95cea8af2ebd22", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12050, "upload_time": "2017-06-23T00:00:18", "url": "https://files.pythonhosted.org/packages/6d/f8/220eefe5ac9803d49f2df5d4fedd876fb210c6e525784c125740d4bda2f3/civet-2.0.3.tar.gz" } ] }