将babeljs与django集成
django-babeljs的Python项目详细描述
#django babel js是babel.js的一个简单接口:将你的javascript模板转换成一个javascript标记。
python
已安装的应用程序+=[“babeljs”]
````
html
{%load babeljs%}
```
``
html
{%babel js%}
````
加载file.js,尝试用babeljs对其进行传输,并将结果复制到模板中(与“include”标记的作用相同)
`````
!html
{%babel“file.js”%}
```
>传输react jsx文件
```
!!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 脚本。
35 35 35 35 35 35
对编译的js使用特定的缓存后端[default=“default”].
=300]。
python
已安装的应用程序+=[“babeljs”]
````
html
{%load babeljs%}
```
``
html
{%babel js%}
````
加载file.js,尝试用babeljs对其进行传输,并将结果复制到模板中(与“include”标记的作用相同)
`````
!html
{%babel“file.js”%}
```
>传输react jsx文件
```
!!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 脚本。
35 35 35 35 35 35
对编译的js使用特定的缓存后端[default=“default”].
=300]。