{
"info": {
"author": "Andrzej Przybyszewski",
"author_email": "mcendrju@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5"
],
"description": "v1.5\n====\n- license changed to the MIT\n\nv1.4\n====\n\n- support for python 3.4\n- support for django 1.9.x\n- support for django-compressor up to 1.6 (2.0 not officially supported but may work in some circumstances)\n- support for utf8 encoding in files (required encoding)\n\nv1.3\n====\n\n- install_requires added,\n- support for django compressor 1.4 precompiler constructor\n\nv1.2\n====\n\n- invalidate cache on compiling error,\n- support for custom logging\n\n\nIntroduction\n============\n\nThis module ables django compressor to compile requirejs files into one\nor a few bigger files using r.js.\n\nFeatures:\n---------\n\n- compiling plenty of files into one file\n- making a few compiled files for splitting functionality\n- all features of django compressor i.e.:\n\n - caching files,\n - adding hashes,\n - processing with django template markup,\n - post compiling\n\n- tracing build files for modification (caching results)\n\nRequirements\n============\n\n- Django >= 1.6\n- django\\_compressor >= 1.3 and < 2.0\n- PyExecJs >= 1.1.0\n\n- node js\n\nInstallation\n============\n\n1. Add ``compressor_requirejs`` to installed apps\n2. Setup ``django_compressor`` properties for working with django\n compressor\n3. Setup ``compressor_requirejs``:\n\n - Set ``COMPRESS_PRECOMPILERS`` of django compressor for using with\n standard markup in compress tags\n - Set ``CACHE`` backends for django compressor and requirejs plugin,\n recomended for development is ``'default'`` with ``DummyCache``\n and ``'locmem'`` with ``LocMemCache``\n - Set ``COMPRESSOR_REQUIREJS_TMP`` to a custom **existing**\n temporary directory path\n\n.. code:: python\n\n CACHES = {\n 'default': {\n 'BACKEND': 'django.core.cache.backends.dummy.DummyCache'\n },\n 'locmem': {\n 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'\n }\n }\n\n COMPRESS_PRECOMPILERS = (\n ('text/requirejs', 'compressor_requirejs.compressor.r_precompiler.RequireJSPrecompiler'),\n )\n\n COMPRESSOR_REQUIREJS_TMP = django_project_path_join('tmp')\n\nAdvanced configuration\n======================\n\n.. code:: python\n\n\n #COMPRESSOR_REQUIREJS config\n\n #absolute path to r.js\n #default: path in resources of this package\n COMPRESSOR_REQUIREJS_R_JS = 'path/to/r.js'\n\n #absolute path to temporary directory\n COMPRESSOR_REQUIREJS_TMP = '/tmp'\n\n #path to global configuration for requirejs bulid aka 'mainConfigFile' in r.js configuration\n # WARNING setting this path overwrites built in global config of this plugin and some feature can not working\n COMPRESSOR_REQUIREJS_GLOBAL_CONFIG = 'path/to/global/requirejs/config.js'\n\n #setup compressor_requirejs caching backend, preferred local memory backend mainly for development,\n #backend should be configured in django CACHE configuration\n #default: 'locmem'\n COMPRESSOR_REQUIREJS_CACHE_BACKEND = 'locmem'\n\n #timeout for caching results in cache (in seconds)\n #default: 3600\n COMPRESSOR_REQUIREJS_CACHE_TIMEOUT = 3600\n\n #node js executable path, it is preferred to have mapped 'node' in your PATH\n #default: node\n COMPRESSOR_REQUIREJS_NODE_EXECUTABLE = 'node'\n\n #setup custom logging function for output\n def logging_compressor_requirejs(text):\n import logging\n logger = logging.getLogger('mainapp.custom')\n logger.debug(text)\n\n COMPRESSOR_REQUIREJS_LOGGING_OUTPUT_FUNCTION = logging_compressor_requirejs\n\n\nUsing\n=====\n\nPrepare at least two js files, one build file and one module file:\n\nbuild.js\n--------\n\n.. code:: javascript\n\n ({\n baseUrl: '.',\n name: 'main'\n })\n\nmain.js\n-------\n\n.. code:: javascript\n\n require([], function () {\n console.log('wow, its working');\n });\n\nPut those files in static directory of your app. ``build.js`` pointing\nto ``main.js`` with ``name`` attribute, so launching build file compile\n``main.js`` with other dependencies.\n\nDjango template configuration\n-----------------------------\n\n::\n\n {% compress js %}\n \n {% endcompress %}\n\nOf course you have to include ``require.js`` file, ex:\n\n::\n\n {% compress js %}\n \n {% endcompress %}\n\nAdvanced features\n=================\n\nYou can use django template language tags in your js files. It can be\nprocessed with django compressor's template processors but there is a\nhack to omit this markup during requirejs compilation.\n\n.. code:: javascript\n\n //>startExclusion\n var importantVariableExcludedDuringCompilationButVisibleInRenderedFile = {{ PROJECT_VARIABLE }};\n //>endExclusion\n\nThose tags are used to exclude fragment of code (commenting it) during\nrequirejs compilation, and after compilation it will be available, and\ncan be processed by django compressor.\n\nAlso you can use tags in string without above markup:\n\n.. code:: javascript\n\n var x = '{{ STATIC_URL }}/path/';\n\n\nGlobal js library mappings\n--------------------------\n\nYou can use global path mappings for javascript files,\nfor example if you have a few apps in project and one handle main libraries simply add them to global paths.\n\n.. code:: python\n\n COMPRESSOR_REQUIREJS_REQUIRED_LIBS = {}\n\nIn django object simply type key value elements, where key is valid path mapping and value is path to js file.\n\n**IMPORTANT**\n\n- mapping name can be only solid string without dots eg.: ``mapping_for_path`` not ``mapping.for.path``\n- path can be relative to current project and will be processed with defined static file finder\n\n\n.. code:: python\n\n COMPRESSOR_REQUIREJS_REQUIRED_LIBS = {\n 'jquery': 'mainapp/js/libs/jquery-2.1.0.min.js'\n }",
"description_content_type": null,
"docs_url": null,
"download_url": "https://github.com/dresiu/compressor_requirejs/tarball/1.5",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/dresiu/compressor_requirejs",
"keywords": "compressor_requirejs,django_compressor,django,compressor,requirejs",
"license": "MIT",
"maintainer": null,
"maintainer_email": null,
"name": "compressor_requirejs",
"package_url": "https://pypi.org/project/compressor_requirejs/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/compressor_requirejs/",
"project_urls": {
"Download": "https://github.com/dresiu/compressor_requirejs/tarball/1.5",
"Homepage": "https://github.com/dresiu/compressor_requirejs"
},
"release_url": "https://pypi.org/project/compressor_requirejs/1.5/",
"requires_dist": null,
"requires_python": null,
"summary": "Library for django compressor, which helps to build requirejs",
"version": "1.5"
},
"last_serial": 2237865,
"releases": {
"1.0": [
{
"comment_text": "",
"digests": {
"md5": "7b3df9e6d2b359df9c76caae9d1a87ee",
"sha256": "54bfde8d9698a7332e3bd81067e3d3f8f10331601bb1db6070cd3c6a90645e7c"
},
"downloads": -1,
"filename": "compressor_requirejs-1.0.zip",
"has_sig": false,
"md5_digest": "7b3df9e6d2b359df9c76caae9d1a87ee",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 239830,
"upload_time": "2014-04-14T14:38:35",
"url": "https://files.pythonhosted.org/packages/7e/d5/2e379cdb82a2a3015127103704cd5ef29b86a35019077e24ca0991a1efef/compressor_requirejs-1.0.zip"
}
],
"1.1": [
{
"comment_text": "",
"digests": {
"md5": "42282b53571dceccbee45eb4c0fcfff8",
"sha256": "5624138f3afa964103d98db12d12049cebac90157b9980ad06baff8bf527f9f8"
},
"downloads": -1,
"filename": "compressor_requirejs-1.1.zip",
"has_sig": false,
"md5_digest": "42282b53571dceccbee45eb4c0fcfff8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 241972,
"upload_time": "2014-04-15T09:32:35",
"url": "https://files.pythonhosted.org/packages/c3/e8/5c9fd980d3c65389250c32d9eaf80840c5423af3f24c2cfc8bb45408120a/compressor_requirejs-1.1.zip"
}
],
"1.1.1": [
{
"comment_text": "",
"digests": {
"md5": "9cd0e2c43fed87ff3bbc9ccf5107314a",
"sha256": "62d742da7bb17fdcd48565dfe6f1de5622c8efaa3c3c58ad8bca872a050469a7"
},
"downloads": -1,
"filename": "compressor_requirejs-1.1.1.zip",
"has_sig": false,
"md5_digest": "9cd0e2c43fed87ff3bbc9ccf5107314a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 256164,
"upload_time": "2014-04-15T11:23:04",
"url": "https://files.pythonhosted.org/packages/c9/18/3479e9fe21fffa30f8f45ff136b46bf9f28196f5f05da735eccda8477aab/compressor_requirejs-1.1.1.zip"
}
],
"1.2": [
{
"comment_text": "",
"digests": {
"md5": "e8756800b2072551bfa27f2abee1a277",
"sha256": "cb7873288aeb3a7356bf2ff27d698d7c782a1805c2e1d5e74491ae8f7ba93494"
},
"downloads": -1,
"filename": "compressor_requirejs-1.2.zip",
"has_sig": false,
"md5_digest": "e8756800b2072551bfa27f2abee1a277",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 256811,
"upload_time": "2014-09-16T09:16:27",
"url": "https://files.pythonhosted.org/packages/5d/14/3ca8dc9beef5dba4daae9d1075d4f069d41e59d96dcbeb1144c1fa8c635b/compressor_requirejs-1.2.zip"
}
],
"1.3": [
{
"comment_text": "",
"digests": {
"md5": "527018ca9f2b00707ca04e4142d9f82d",
"sha256": "80cf75eaed906a4420afea0b42ead8d3823c4613f433709e46d13a6b1ae5ef04"
},
"downloads": -1,
"filename": "compressor_requirejs-1.3.zip",
"has_sig": false,
"md5_digest": "527018ca9f2b00707ca04e4142d9f82d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 261131,
"upload_time": "2014-11-09T17:58:51",
"url": "https://files.pythonhosted.org/packages/93/02/6ba756045f2804e5984c03f9eee5ec92668e7ea929f24abf6a0eb2cd0756/compressor_requirejs-1.3.zip"
}
],
"1.4": [
{
"comment_text": "",
"digests": {
"md5": "bc095a4db57d6d036ef649ce67c1d3a0",
"sha256": "675676a82399f8555149ac1c1c7e902e21efe7e58706ba51978dcdbbbc291e90"
},
"downloads": -1,
"filename": "compressor_requirejs-1.4.zip",
"has_sig": false,
"md5_digest": "bc095a4db57d6d036ef649ce67c1d3a0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 261672,
"upload_time": "2016-04-15T15:12:08",
"url": "https://files.pythonhosted.org/packages/0d/2d/124f1b8c56ca5950b01dc0194a943defc381e22e49acbef24feb28dbf533/compressor_requirejs-1.4.zip"
}
],
"1.5": [
{
"comment_text": "",
"digests": {
"md5": "bfee18c4df56c36878555ca48610fe3a",
"sha256": "5e610e70eb5bd8f2f403725fad077fcb11a450ac4fd8922df0ec66112917afac"
},
"downloads": -1,
"filename": "compressor_requirejs-1.5.zip",
"has_sig": false,
"md5_digest": "bfee18c4df56c36878555ca48610fe3a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 250602,
"upload_time": "2016-07-22T12:51:31",
"url": "https://files.pythonhosted.org/packages/a8/93/4c3fc0405762650832ffdd8cb22bc5c7e1b9e8a315ce88f4302257e443b4/compressor_requirejs-1.5.zip"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "bfee18c4df56c36878555ca48610fe3a",
"sha256": "5e610e70eb5bd8f2f403725fad077fcb11a450ac4fd8922df0ec66112917afac"
},
"downloads": -1,
"filename": "compressor_requirejs-1.5.zip",
"has_sig": false,
"md5_digest": "bfee18c4df56c36878555ca48610fe3a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 250602,
"upload_time": "2016-07-22T12:51:31",
"url": "https://files.pythonhosted.org/packages/a8/93/4c3fc0405762650832ffdd8cb22bc5c7e1b9e8a315ce88f4302257e443b4/compressor_requirejs-1.5.zip"
}
]
}