{ "info": { "author": "Austin Morton", "author_email": "amorton@juvsoft.com", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP" ], "description": "Ember Compressor Compiler\n=========================\n\n[![Build Status](https://travis-ci.org/Juvenal1228/ember-compressor-compiler.png?branch=master)](https://travis-ci.org/Juvenal1228/ember-compressor-compiler)\n\nPurpose\n-------\n\nThis tool is meant to be used as an extension to [django-compressor](https://github.com/jezdez/django_compressor)\n\nIt precompiles [handlebars.js](https://github.com/wycats/handlebars.js) templates specifically for [ember.js](https://github.com/emberjs/ember.js)\n\n\nFeatures\n--------\n\n- platform independent\n- no need to install node.js packages\n- flexible template naming conventions\n- inline handlebars in django templates\n- 100% test coverage\n- [PEP 8](http://www.python.org/dev/peps/pep-0008/) compliance\n- [semver](http://semver.org/) compliance\n\n\nInstalling\n----------\n\nInstall with pip/easy_install from the pypi\n\n`pip install ember-compressor-compiler`\n\nor clone the latest source\n\n git clone https://github.com/Juvenal1228/ember-compressor-compiler.git\n cd ember-compressor-compiler\n python setup.py install\n\nYou must also install [node.js](http://nodejs.org/) or [PyV8](https://code.google.com/p/pyv8/)\n\nThe latest versions of node.js can be found [here](http://nodejs.org/download/)\n\nUsing\n-----\n\nUsing this tool is as simple as installing it and adding it to the `COMPRESS_PRECOMPILERS` django setting\n\n```python\nCOMPRESS_PRECOMPILERS = (\n ('text/x-handlebars', 'embercompressorcompiler.filter.EmberHandlebarsCompiler'),\n)\n```\n\nThen, in your django templates you can embed handlebars templates like so\n```html+django\n{% load staticfiles %}\n{% load compress %}\n\n{% compress js %}\n\n\n{% endcompress %}\n```\n\nTemplate Names\n--------------\n\nTemplate names are determined in one of two ways\n\n1. the `data-template-name` attribute on the `script` tag in your django template\n2. the `src` attribute on the `script` tag in your django template\n\nWhen specified, the `data-template-name` value is used verbatim\n\nIf not, the `src` value is manipulated to give proper template names.\n\n- the file extensions `.handlebars` and `.hbs` are removed\n- everything before the parent directory `templates` is removed\n\n\n```html+django\n\n\n\n\n\n```\n\nAdvanced Usage\n--------------\n\nIf you need to change the template naming behavior, you can subclass `embercompressorcompiler.filter.EmberHandlebarsCompiler`\n\n```python\nfrom embercompressorcompiler.filter import EmberHandlebarsCompiler\n\nclass MyCompiler(EmberHandlebarsCompiler):\n # override default parent directory\n parent_dir = 'tpls'\n \n # override default extensions\n extensions = ['.tpl']\n```\n\nThen you register your own compiler subclass in `COMPRESS_PRECOMPILERS`\n\n```python\nCOMPRESS_PRECOMPILERS = (\n ('text/x-handlebars', 'myapp.MyCompiler'),\n)\n```", "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/Juvenal1228/ember-compressor-compiler", "keywords": "", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "ember-compressor-compiler", "package_url": "https://pypi.org/project/ember-compressor-compiler/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ember-compressor-compiler/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Juvenal1228/ember-compressor-compiler" }, "release_url": "https://pypi.org/project/ember-compressor-compiler/0.3.1/", "requires_dist": null, "requires_python": null, "summary": "django_compressor filter to compile ember templates", "version": "0.3.1" }, "last_serial": 830428, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "2eba760a97ff454c614c0e13ec12cbda", "sha256": "f7e48f61ec224df5a04d52e30fb0f82e8e0a5ac70680c3f777d995a3eba8ecdb" }, "downloads": -1, "filename": "ember-compressor-compiler-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2eba760a97ff454c614c0e13ec12cbda", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4911, "upload_time": "2013-04-17T04:08:19", "url": "https://files.pythonhosted.org/packages/3d/fd/de3a2028efde38f981e90029baa1ce5fdfcf4a46e33cfdf3d4a2f97b6cdb/ember-compressor-compiler-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "a8d8ff8ccbf6bdb53a516e17459e2e3e", "sha256": "0393acba14a6b9520956fd88c6fef1dd911a1db1ddcd21e6fe55c9b10ea11323" }, "downloads": -1, "filename": "ember-compressor-compiler-0.1.1.zip", "has_sig": false, "md5_digest": "a8d8ff8ccbf6bdb53a516e17459e2e3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31541, "upload_time": "2013-04-17T17:28:47", "url": "https://files.pythonhosted.org/packages/df/01/45111b7bce3827eb545b4a4026d2469aa6389aa899d4e9282d080f8e3ba0/ember-compressor-compiler-0.1.1.zip" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "a42df77251273cb464a3aaa575c946d4", "sha256": "000d674b184dab1c9607057ccdeee05ab950c271a149b4c532e88be8f8d5f87b" }, "downloads": -1, "filename": "ember-compressor-compiler-0.2.0.zip", "has_sig": false, "md5_digest": "a42df77251273cb464a3aaa575c946d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32424, "upload_time": "2013-06-04T17:51:37", "url": "https://files.pythonhosted.org/packages/16/70/305a09376401802dc10e9a93434a8c8482169ba69aa86a1c1ce6a24ba96b/ember-compressor-compiler-0.2.0.zip" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "6b86a6630daa1c48141a1080010f5217", "sha256": "00343c6a238db62456746e6322c32c262e16fc5083cdbf89df980ddb2907e402" }, "downloads": -1, "filename": "ember-compressor-compiler-0.3.0.tar.gz", "has_sig": false, "md5_digest": "6b86a6630daa1c48141a1080010f5217", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27323, "upload_time": "2013-07-04T07:07:16", "url": "https://files.pythonhosted.org/packages/12/40/4dd8ca157870ab7892900ebe66490d4a3d66f7155f337c91fbe03b9003c1/ember-compressor-compiler-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "07bbde62e1f89732cf3a2a8ab71da140", "sha256": "030eb25f035d7297e8d4b478af8e7039c720355c18045625d41342f3392c5500" }, "downloads": -1, "filename": "ember-compressor-compiler-0.3.1.zip", "has_sig": false, "md5_digest": "07bbde62e1f89732cf3a2a8ab71da140", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33759, "upload_time": "2013-08-01T20:16:31", "url": "https://files.pythonhosted.org/packages/25/64/8e1a675259bc3decff1af5e23dc4940eb028b0e3651516ada4a4abcd0425/ember-compressor-compiler-0.3.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "07bbde62e1f89732cf3a2a8ab71da140", "sha256": "030eb25f035d7297e8d4b478af8e7039c720355c18045625d41342f3392c5500" }, "downloads": -1, "filename": "ember-compressor-compiler-0.3.1.zip", "has_sig": false, "md5_digest": "07bbde62e1f89732cf3a2a8ab71da140", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33759, "upload_time": "2013-08-01T20:16:31", "url": "https://files.pythonhosted.org/packages/25/64/8e1a675259bc3decff1af5e23dc4940eb028b0e3651516ada4a4abcd0425/ember-compressor-compiler-0.3.1.zip" } ] }