This project has been archived by its maintainers, and is no longer receiving any updates.
A simple interface to babel.js: transpile your javascript template into a javascript tag.
## install ##
Just include `babeljs` into your `INSTALLED_APPS`
```
#!python
INSTALLED_APPS += [ "babeljs" ]
```
## templatetag ##
Load the templatetag
```
#!html
{% load babeljs %}
```
### babeljs ###
Include the babeljs file(s) as `<scrip...></script>` tag(s).
It is useful only for in browser transpilation (ie: no nodejs is installed), otherwise can be omitted
```
#!html
{% babeljs %}
```
### babel ###
load file.js, try to transpile it with babeljs and copy the result into the template (acts the same as the `include` tag)
```
#!html
{% babel "file.js" %}
```
transpile a react jsx file
```
#!html
{% babel "file.jsx" %}
```
## settings ##
### BABELJS_BABEL ###
Provide a custom babeljs script.
### BABELJS_ROOT ###
Where to find the babeljs script.
### BABELJS_MINIFIED ###
If use or not the minified version [default=not DEBUG].
Useful only for default babeljs script.
### BABELJS_CACHE_BACKEND ###
Use a specific cache backend for compiled js [default="default"].
### BABELJS_CACHE_TIMEOUT ###
The number of seconds the transpiled code should be stored in the cache, 0 for never cache it, None for cache it forever [default=300].
Metadata
Release files for django-babeljs 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_babeljs-0.2-py3-none-any.whl | Python 3 | none | any | Details for django_babeljs-0.2-py3-none-any.whl |
Release files / django_babeljs-0.2-py3-none-any.whl
| Download URL | django_babeljs-0.2-py3-none-any.whl |
|---|---|
| Size | 679.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18aebe31f92bce55785ba2fb778bc3b2cc412d6d84481306c636304bfe86049f
|
|
BLAKE2b-256 checksum How to use checksums |
09a22f06b274947663694394ec7d2d8e9f92e853e4b904491e8c68c894aa85c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-babeljs 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.