{ "info": { "author": "Bas Peschier", "author_email": "bpeschier@fizzgig.nl", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "===========================\ndjango-compressor-requirejs\n===========================\n\nPrecompiler for `django-compressor `_ to integrate\n`RequireJS `_-modules into `bundles `_.\n\nThis library does not use the `r.js `_ compressor, but instead collects the\ndependencies from your templates and resolves them into bundles, letting django-compressor do the compressing.\n\nInstallation\n~~~~~~~~~~~~\n\nFirst, `install django-compressor `_\ninto your Django project and configure it. Then install django-compressor-requirejs::\n\n pip install django-compressor-requirejs\n\nand add ``requirejs.RequireJSCompiler`` to your ``COMPRESS_PRECOMPILERS`` setting::\n\n COMPRESS_PRECOMPILERS = (\n ('text/requirejs', 'requirejs.RequireJSCompiler'),\n )\n\nYou can now use the content type text/requirejs on your main RequireJS script tag::\n\n {% compress js %}\n \n {% endcompress %}\n\nThe library will by default generate a single bundle with all modules found in templates\nand their dependencies. Dynamic dependencies will not be found. It also sets the ``baseUrl``\nto your ``STATIC_URL``.\n\nIf ``COMPRESS_ENABLED`` is ``False``, only the config will be added and RequireJS will load\nmodules one by one, without bundles.\n\nSettings\n~~~~~~~~\n\nYou can control RequireJS with three options:\n\n``REQUIREJS_PATHS`` is a dict in the same style as the RequireJS path config. This can be used for example\nto make jQuery available in the main namespace (``\"jquery\": \"/jquery.min\"``).\n\n``REQUIREJS_BUNDLES`` is a dict to specify which modules get bundled together::\n\n REQUIREJS_BUNDLES = {\n 'abovethefold': ['website/awesome', 'website/evenmoreawesome'],\n }\n\nEvery module not mentioned in this setting will end up in the ``main`` catch-all bundle.\n\n``REQUIREJS_APP_ALIAS`` (default ``None``) allows the Javascript directory inside your static root to be addressed by\njust the app name. Require/define calls to ``website/some_module`` will be searched as\n``{{ STATIC_URL }}/website//some_module.js`` if not found in ``{{ STATIC_URL }}/website/``.\n\nUnder the hood\n~~~~~~~~~~~~~~\n\ndjango-compressor-requirejs makes use of RequireJS's ``bundles`` configuration option, making it possible to bundle\nmodules together and let RequireJS fetch the bundle when it needs one of the modules. The philosophy is that modules\nbundled together are really often used together, which lowers the amount of requests the browser has to do.\n\nIt uses the filter mechanism in django-compressor on the script tag used to load RequireJS itself, injecting a\nconfiguration pointing RequireJS to ``STATIC_URL`` and -- if compression is enabled -- the compressed bundle(s).\n\nDiscovery of modules is done by searching all template directories for calls to RequireJS and parsing their\ndependencies. This is a plain text search, no real parsing of Javascript or HTML is done (similar to ``makemessages``).\nAll found modules are then similarly scanned for their dependencies.\n\nSince no parsing or evaluation is done, any dynamic loading of dependencies with variables is not supported. If you\nwant to let django-compressor-requirejs pick it up, annotate the require() call with all options (if feasible, of\ncourse).\n\n\nSo django-require and compressor_requirejs exist.\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYes, they do; and if you want to use the (otherwise excellent) r.js compressor with django-compressor, please take a\nlook at `compressor_requirejs `_. And if you do not use\ndjango-compressor, visit etianen's `django-require `_.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/bpeschier/django-compressor-requirejs", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-compressor-requirejs", "package_url": "https://pypi.org/project/django-compressor-requirejs/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-compressor-requirejs/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/bpeschier/django-compressor-requirejs" }, "release_url": "https://pypi.org/project/django-compressor-requirejs/0.3/", "requires_dist": null, "requires_python": null, "summary": "Compress requirejs-modules into bundles.", "version": "0.3" }, "last_serial": 1962905, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "81b86a84c8700138238b8dd1c6ea019a", "sha256": "84c0d35e2f232f27fd033897015a27aeab124498fd2b3b5c9ac7569ad67c68b0" }, "downloads": -1, "filename": "django_compressor_requirejs-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "81b86a84c8700138238b8dd1c6ea019a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8308, "upload_time": "2014-09-20T12:49:35", "url": "https://files.pythonhosted.org/packages/0a/c2/703dce2c24a3add2e6cb279dd0c11a42f4dbbd67fbfcda1cae1c61799059/django_compressor_requirejs-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9790842bf18aa69ea9f65d8d7a73f97f", "sha256": "50c1ae7b5d2082720cbf2e3a9e55c6b7ca0735b300e0d6a8b5dc2d93cff1533d" }, "downloads": -1, "filename": "django-compressor-requirejs-0.1.tar.gz", "has_sig": false, "md5_digest": "9790842bf18aa69ea9f65d8d7a73f97f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5411, "upload_time": "2014-09-20T12:49:32", "url": "https://files.pythonhosted.org/packages/79/2f/620fa84185e16f85ae3a302deeb58420ae0dc722a645a6fff211ed0e313d/django-compressor-requirejs-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "fd9c83793794426b612d0fc81798f16c", "sha256": "fc00f91606bb6e4e1f0171b4ca4cf9d95a787f8567b8678a095d579ec2d50950" }, "downloads": -1, "filename": "django_compressor_requirejs-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fd9c83793794426b612d0fc81798f16c", "packagetype": "bdist_wheel", "python_version": "3.3", "requires_python": null, "size": 8432, "upload_time": "2014-09-29T18:05:49", "url": "https://files.pythonhosted.org/packages/f6/d5/0f08826787c06e4ac110ee45dc56043a9ad984ee26a333a2fa90e3725a7c/django_compressor_requirejs-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a5f830a7c8e3e4f3c89e41ab43b37b9b", "sha256": "cac1d13099a162836fa505d3f2e397f3872c0c6772e2dc554108af9e5847022d" }, "downloads": -1, "filename": "django-compressor-requirejs-0.2.tar.gz", "has_sig": false, "md5_digest": "a5f830a7c8e3e4f3c89e41ab43b37b9b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5582, "upload_time": "2014-09-29T18:05:45", "url": "https://files.pythonhosted.org/packages/46/5d/ca58c166eae8d99305f9aa0fac8daecb9dccacb4f7cbc242c41cf794f957/django-compressor-requirejs-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "58eb623c6715a08ecd79bc7da5cd032c", "sha256": "ba3dd0bc2ce6bc7c7c1cee072d4949d154b74ef798f466beae6a8dbb23e79873" }, "downloads": -1, "filename": "django_compressor_requirejs-0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "58eb623c6715a08ecd79bc7da5cd032c", "packagetype": "bdist_wheel", "python_version": "3.3", "requires_python": null, "size": 13767, "upload_time": "2014-11-09T13:54:27", "url": "https://files.pythonhosted.org/packages/aa/3e/0a31d9fa18024424fa0e7c347656ba17423c4484c2cd5700a078be1255fb/django_compressor_requirejs-0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aeba6f45394235a55e9cf5863ef49d26", "sha256": "5d8fa40e4122d85404268dbc2d1f1ac9d6405855242602eb041593b60bc48414" }, "downloads": -1, "filename": "django-compressor-requirejs-0.3.tar.gz", "has_sig": false, "md5_digest": "aeba6f45394235a55e9cf5863ef49d26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7077, "upload_time": "2014-11-09T13:54:25", "url": "https://files.pythonhosted.org/packages/ab/23/cfdf7d2f1fa33065e2d07c68f7c6e6fb048e8f6616eb7be0598ae59efe73/django-compressor-requirejs-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "58eb623c6715a08ecd79bc7da5cd032c", "sha256": "ba3dd0bc2ce6bc7c7c1cee072d4949d154b74ef798f466beae6a8dbb23e79873" }, "downloads": -1, "filename": "django_compressor_requirejs-0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "58eb623c6715a08ecd79bc7da5cd032c", "packagetype": "bdist_wheel", "python_version": "3.3", "requires_python": null, "size": 13767, "upload_time": "2014-11-09T13:54:27", "url": "https://files.pythonhosted.org/packages/aa/3e/0a31d9fa18024424fa0e7c347656ba17423c4484c2cd5700a078be1255fb/django_compressor_requirejs-0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aeba6f45394235a55e9cf5863ef49d26", "sha256": "5d8fa40e4122d85404268dbc2d1f1ac9d6405855242602eb041593b60bc48414" }, "downloads": -1, "filename": "django-compressor-requirejs-0.3.tar.gz", "has_sig": false, "md5_digest": "aeba6f45394235a55e9cf5863ef49d26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7077, "upload_time": "2014-11-09T13:54:25", "url": "https://files.pythonhosted.org/packages/ab/23/cfdf7d2f1fa33065e2d07c68f7c6e6fb048e8f6616eb7be0598ae59efe73/django-compressor-requirejs-0.3.tar.gz" } ] }