{ "info": { "author": "Philip J Grabner, Canary Health Inc", "author_email": "oss@canary.md", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "License :: Public Domain", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development" ], "description": "============================\nJavaScript Template Compiler\n============================\n\nThe `jstc` Python package compiles and packages JavaScript templates\nfor delivery to browsers for client-side evaluation.\n\nCurrently, only `Handlebars`_ and `Mustache`_ template formats are\nsupported natively, however this is easily extended via jstc's plugin\nmechanism.\n\n\nProject\n=======\n\n* Homepage: https://github.com/canaryhealth/jstc\n* Bugs: https://github.com/canaryhealth/jstc/issues\n* Manual: https://github.com/canaryhealth/jstc/blob/master/doc/manual.rst\n\n\nInstallation\n============\n\n.. code:: bash\n\n $ pip install jstc\n\n\nOptionally, the handlebars pre-compiler can be installed to\npre-compile JavaScript templates for faster client-side rendering:\n\n.. code:: bash\n\n # OPTIONAL: install handlebars pre-compiler\n $ npm install handlebars\n $ export PATH=\"`pwd`/node_modules/.bin:$PATH\"\n\n\nUsage\n=====\n\nThe typical usage is to have something similar to the following in\nyour HTML generation template (here, using `Mako`_ syntax):\n\n.. code:: mako\n\n <%! import jstc %>\n \n \n \n\n
Loading...
\n\n \n
\n ${jstc.render_assets('myapp:static/scripts/**.hbs')|n}\n
\n\n \n\n \n \n\n\nExample\n=======\n\nGiven that the following files exist in the Python package `myapp`:\n\nFile ``myapp/static/templates/common/hello.hbs``::\n\n Hello, {{name}}!\n\n\nFile ``myapp/static/templates/common/inputs.hbs`` (a \"multi-template\" file)::\n\n ##! text\n\n \n\n ##! checkbox\n\n \n\n\nThen, the Python code (`inline` and `precompile` attributes used for\noutput simplicity):\n\n.. code:: python\n\n import jstc\n jstc.render_assets(\n 'myapp:static/templates/common/**.hbs', 'static/templates',\n force_inline=True, force_precompile=False)\n\n\nOutputs the following HTML (whitespace and newlines added for clarity):\n\n.. code:: html\n\n \n\n \n\n \n\n\nSee https://github.com/canaryhealth/jstc/blob/master/doc/manual.rst for\nmore documentation.\n\n\n.. _Handlebars: http://handlebarsjs.com/\n.. _Mustache: http://mustache.github.io/\n.. _Mako: http://www.makotemplates.org/\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/canaryhealth/jstc", "keywords": "javascript server-side template compiler packager", "license": "MIT (http://opensource.org/licenses/MIT)", "maintainer": "", "maintainer_email": "", "name": "jstc", "package_url": "https://pypi.org/project/jstc/", "platform": "", "project_url": "https://pypi.org/project/jstc/", "project_urls": { "Homepage": "http://github.com/canaryhealth/jstc" }, "release_url": "https://pypi.org/project/jstc/0.1.7/", "requires_dist": null, "requires_python": "", "summary": "Server-side JavaScript template compilation and packaging", "version": "0.1.7" }, "last_serial": 2545106, "releases": { "0.1.0": [], "0.1.3": [ { "comment_text": "", "digests": { "md5": "d0a048001039388884e91d073097dbef", "sha256": "50f98ea5117fb22a748fd12d11b576adac4b7a915bf3a049ad6b25900ef326d8" }, "downloads": -1, "filename": "jstc-0.1.3.tar.gz", "has_sig": false, "md5_digest": "d0a048001039388884e91d073097dbef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17118, "upload_time": "2016-09-22T23:20:47", "url": "https://files.pythonhosted.org/packages/0e/bf/010256348b015694e6a831f2155f03c8b2e128e839468fb814c4313122d3/jstc-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "ab35488ca41ad7a59468591e3d847967", "sha256": "d1dc3f6da9f191e6a6d1fa4e668aad9608fa6698b07104c0695b1ad812575400" }, "downloads": -1, "filename": "jstc-0.1.4.tar.gz", "has_sig": false, "md5_digest": "ab35488ca41ad7a59468591e3d847967", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18215, "upload_time": "2016-09-27T21:32:16", "url": "https://files.pythonhosted.org/packages/66/00/1a82aae7a4aa2e04e4e3f2e60b637bafd199b47d41ef94f17bcc71807478/jstc-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "040154d823e9dd7c79234c52770552b7", "sha256": "42f386f6675024d194276d8fa0c1b0e03fd30a2c64a397eeef5f796e5652abe1" }, "downloads": -1, "filename": "jstc-0.1.5.tar.gz", "has_sig": false, "md5_digest": "040154d823e9dd7c79234c52770552b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19489, "upload_time": "2016-12-28T18:24:29", "url": "https://files.pythonhosted.org/packages/8d/89/c29fd8c7194abed491b4581a5d677222a900d624982cd311019911d28ff4/jstc-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "0f578cd6b4275892570e4b2a11ae77a2", "sha256": "16057e044eac6cd1a03b04321d5f240120e0acb4b151dceacff917eb258be232" }, "downloads": -1, "filename": "jstc-0.1.6.tar.gz", "has_sig": false, "md5_digest": "0f578cd6b4275892570e4b2a11ae77a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19720, "upload_time": "2016-12-29T04:02:16", "url": "https://files.pythonhosted.org/packages/f4/61/d86061f9a8790846df2c5e945f123d9b3a833f5cf8698f6a756003786cce/jstc-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "e37b7fa3b267726303ebd5509d650f7e", "sha256": "4626ebb26bb1774201770ea1b1850401d43f18c758ad00b885c2762389471646" }, "downloads": -1, "filename": "jstc-0.1.7.tar.gz", "has_sig": false, "md5_digest": "e37b7fa3b267726303ebd5509d650f7e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21634, "upload_time": "2016-12-29T23:41:26", "url": "https://files.pythonhosted.org/packages/25/e4/466025db006d9b0b69c59b63b58ee386598151d2b2c4bac8dd8d08a29034/jstc-0.1.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e37b7fa3b267726303ebd5509d650f7e", "sha256": "4626ebb26bb1774201770ea1b1850401d43f18c758ad00b885c2762389471646" }, "downloads": -1, "filename": "jstc-0.1.7.tar.gz", "has_sig": false, "md5_digest": "e37b7fa3b267726303ebd5509d650f7e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21634, "upload_time": "2016-12-29T23:41:26", "url": "https://files.pythonhosted.org/packages/25/e4/466025db006d9b0b69c59b63b58ee386598151d2b2c4bac8dd8d08a29034/jstc-0.1.7.tar.gz" } ] }