{
"info": {
"author": "Johannes Staffans",
"author_email": "johannes.staffans@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Environment :: Web Environment",
"Framework :: Django",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6"
],
"description": "django-cljs-loader\n==================\n\nTransparent integration of ClojureScript in a Django project. Currently\nsupports `Leiningen `__ and\n`Figwheel `__, which means you\ncan rely on Figwheel's auto-refresh features during development.\n\nThis project is heavily inspired by the\n`django-webpack-loader `__\nproject, which has the similar goal of transparently including and using\nWebpack bundles in a Django project.\n\nThe integration with Leiningen is simplistic: information is read from\nthe Leiningen ``project.clj`` file to determine which output bundles are\navailable and where. This means that there is a tight coupling to the\nstructure of the Leiningen project file -- expect things to break if you\nhave a really exotic project setup!\n\nInstall\n-------\n\n.. code:: shell\n\n $> pip install django-cljs-loader\n\nUsage\n-----\n\nExamples\n~~~~~~~~\n\nThis repository contains one example application, have a look at that to\nsee a working setup in action.\n\n- `Simple clock\n application `__\n\nSome more advanced examples are on the way!\n\nSettings\n~~~~~~~~\n\nOnly Leiningen projects are supported. With a ``project.clj`` file\nsomewhere in your project, you can set the ``django-cljs`` loader up in\nyour app settings.\n\nIt should look something like this:\n\n.. code:: python\n\n from edn_format.edn_lex import Keyword\n\n BASE_DIR = ... # should point to the project root\n\n STATIC_URL = '/static/'\n\n CLJS_LOADER = {\n # where to find the Leiningen project file\n 'PROJECT_FILE': os.path.join(BASE_DIR, 'project.clj'),\n\n # If True, tries to load JS files from the Figwheel dev server.\n # Set to False in production mode.\n 'FIGWHEEL': True,\n\n # Which cljs build (defined in the project.clj file) to use.\n # Change this for production.\n 'CLJS_BUILD': Keyword('dev'),\n\n # The root folder for assets built by Leiningen.\n # In development mode, this matches the Figwheel root.\n 'ROOT': 'assets/public',\n }\n\n # Add the folder where cljsbuild output lands as a source directory for the \n # staticfiles app. This assumes you are using the staticfiles app.\n STATICFILES_DIRS = (\n os.path.join(BASE_DIR, CLJS_LOADER['ROOT']),\n )\n\nWhere you put the ClojureScript source files is up to you -\n``assets/cljs`` is one possibility. See the example projects.\n\nTemplate tag\n~~~~~~~~~~~~\n\nUse the ``render_bundle`` template tag to hook the compiled\nClojureScript bundle into your application. It will insert a ``script``\ntag and call the ``main`` function you have defined in the Leiningen\nproject file.\n\n::\n\n {% load render_bundle from cljs_loader %}\n ...\n \n ...\n {% render_bundle %} \n \n\nDevelopment\n~~~~~~~~~~~\n\nOpen a second terminal and run ``lein figwheel``. Alternatively, launch\na REPL and do ``(fig-start)``. The JavaScript bundle will be loaded from\nthe Figwheel development server.\n\nProduction\n~~~~~~~~~~\n\nAssuming you have a cljsbuild profile called ``prod``:\n\n::\n\n $> lein cljsbuild once prod\n\nThe compiled bundle that is produced by ``lein cljsbuild`` can be\ncollected with ``python manage.py collectstatic``, or whichever your\npreferred method of including production assets is.\n\nThe ``render_bundle`` template tag does not need to change.\n\nContributing\n------------\n\nYou can run the test suite in the ``tests`` folder with the following\ncommand:\n\n::\n\n $> make test\n\n\n",
"description_content_type": null,
"docs_url": null,
"download_url": "https://github.com/jstaffans/django-cljs-loader/tarball/0.1.1",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/jstaffans/django-cljs-loader",
"keywords": "django,clojurescript",
"license": "",
"maintainer": "",
"maintainer_email": "",
"name": "django-cljs-loader",
"package_url": "https://pypi.org/project/django-cljs-loader/",
"platform": "",
"project_url": "https://pypi.org/project/django-cljs-loader/",
"project_urls": {
"Download": "https://github.com/jstaffans/django-cljs-loader/tarball/0.1.1",
"Homepage": "https://github.com/jstaffans/django-cljs-loader"
},
"release_url": "https://pypi.org/project/django-cljs-loader/0.1.1/",
"requires_dist": [
"edn-format (==0.5.12)"
],
"requires_python": "",
"summary": "ClojureScript integration for Django",
"version": "0.1.1"
},
"last_serial": 3439696,
"releases": {
"0.1.0": [
{
"comment_text": "",
"digests": {
"md5": "f592dccf6b83c2df6e0ee5380a9747cf",
"sha256": "7320675bd939924f123d1fc294d1737ff79a74f6835d541bfaa6c84a5b12d960"
},
"downloads": -1,
"filename": "django_cljs_loader-0.1.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "f592dccf6b83c2df6e0ee5380a9747cf",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 8165,
"upload_time": "2017-12-23T21:55:41",
"url": "https://files.pythonhosted.org/packages/d5/39/062d064bef2b3deba830569449ad551c2e85c8c825f7f0834e9f3d9ba74c/django_cljs_loader-0.1.0-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "1dfb102316ba22079ed555e5eaa22a6f",
"sha256": "3aaaf239c46a6670d26dd060096410743a5becb7073ef2c2d2f551f1577eca2e"
},
"downloads": -1,
"filename": "django-cljs-loader-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "1dfb102316ba22079ed555e5eaa22a6f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4997,
"upload_time": "2017-12-23T21:55:43",
"url": "https://files.pythonhosted.org/packages/b7/32/4d3efd4849f78da3b8342b3c5397b5afeca72dfa215eba164c80fbfb7838/django-cljs-loader-0.1.0.tar.gz"
}
],
"0.1.1": [
{
"comment_text": "",
"digests": {
"md5": "4b8931301f2a38d3b361cf05206c147c",
"sha256": "2118eb258e2629f976ac1e6839093d8df175d4b93831e8e4c87cbed41a22828d"
},
"downloads": -1,
"filename": "django_cljs_loader-0.1.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "4b8931301f2a38d3b361cf05206c147c",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 8126,
"upload_time": "2017-12-23T22:02:23",
"url": "https://files.pythonhosted.org/packages/1f/cb/ee548e02793e9bebbfea085f1f6e6dbe8f33d67b93b67f53c012b9bde46b/django_cljs_loader-0.1.1-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "443c9711ba8d7a56a632ae1df2c07e25",
"sha256": "0ea7ef468e6a3a5f6009c9dacd5f46e6982a49fd362cfc1eacaf505a474a318c"
},
"downloads": -1,
"filename": "django-cljs-loader-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "443c9711ba8d7a56a632ae1df2c07e25",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4985,
"upload_time": "2017-12-23T22:02:26",
"url": "https://files.pythonhosted.org/packages/2f/0e/e37028a91f3ede3f6506295269974b9a8c4f788030371da6258e0510ecee/django-cljs-loader-0.1.1.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "4b8931301f2a38d3b361cf05206c147c",
"sha256": "2118eb258e2629f976ac1e6839093d8df175d4b93831e8e4c87cbed41a22828d"
},
"downloads": -1,
"filename": "django_cljs_loader-0.1.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "4b8931301f2a38d3b361cf05206c147c",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 8126,
"upload_time": "2017-12-23T22:02:23",
"url": "https://files.pythonhosted.org/packages/1f/cb/ee548e02793e9bebbfea085f1f6e6dbe8f33d67b93b67f53c012b9bde46b/django_cljs_loader-0.1.1-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "443c9711ba8d7a56a632ae1df2c07e25",
"sha256": "0ea7ef468e6a3a5f6009c9dacd5f46e6982a49fd362cfc1eacaf505a474a318c"
},
"downloads": -1,
"filename": "django-cljs-loader-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "443c9711ba8d7a56a632ae1df2c07e25",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4985,
"upload_time": "2017-12-23T22:02:26",
"url": "https://files.pythonhosted.org/packages/2f/0e/e37028a91f3ede3f6506295269974b9a8c4f788030371da6258e0510ecee/django-cljs-loader-0.1.1.tar.gz"
}
]
}