oveleon/contao-theme-compiler-bundle

主题管理器捆绑的Theme-Compiler

1.9.1 2024-09-13 07:16 UTC

README

contao 主题编译器捆绑包为您的主题设置添加了编译选定 scss 文件的功能。

特性

  • 在您的 contao 安装中编译您的 scss 文件
  • 在您的主题旁边添加编译按钮
  • 能够添加多个源文件
  • 能够将多个文件编译成一个
  • 为编译的 scss 启用备份

如何安装该包

通过 composer

composer require oveleon/contao-theme-compiler-bundle

通过 contao-manager

Search for contao theme compiler bundle and add it to your extensions.

初始设置

  1. 创建一个主题并在您的主题设置中添加源文件

  2. 为源文件添加目标文件夹

  3. (可选设置:合并文件等)

  4. 保存

    Admin View: Advanced form overview

  5. 在主题设置中编译,在主题概览下,在维护或通过控制台命令

    Admin View: Advanced form overview Admin View: Advanced form overview

    php vendor/bin/contao-console contao:themecompiler:compile [id]
    

控制台命令

列出主题

  • 输出 tl_theme 中您的主题列表
php vendor/bin/contao-console contao:themecompiler:list

编译主题

  • 编译主题([id] 是必填项)
php vendor/bin/contao-console contao:themecompiler:compile [id]

其他

在每次编译时启用文件同步

版本 1.8 已重写,跳过 DBAFS 同步,如果文件已存在。这节省了每个输出文件的数据库调用和逻辑,并提高了编译时间。

要启用旧行为,请在您的 config.yaml 中使用以下内容

# config/config.yml
contao_theme_compiler:
  file_sync: true