在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:andreyfedoseev/django-static-precompiler开源软件地址:https://github.com/andreyfedoseev/django-static-precompiler开源编程语言:Python 98.6%开源软件介绍:Django Static PrecompilerDjango Static Precompiler provides template tags and filters to compile CoffeeScript, LiveScript, SASS / SCSS, LESS, Stylus, Babel and Handlebars. It works with both inline code and external files. DocumentationDocumentation is available at http://django-static-precompiler.readthedocs.io. Installpip install django-static-precompiler Use in templates{% load compile_static %}
{% load static %}
<script src="{% static "path/to/script.coffee"|compile %}"></script>
<link rel="stylesheet" href="{% static "path/to/styles1.less"|compile %}" />
<link rel="stylesheet" href="{% static "path/to/styles2.scss"|compile %}" /> Use in Python>>> from static_precompiler.utils import compile_static
>>> compile_static("styles.scss")
"COMPILED/styles.css" Python compatibilityPython 3.6+ is required. Django compatibility
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论