oveleon / contao-theme-compiler-bundle
Theme-Compiler for Theme-Manager Bundles
Installs: 3 532
Dependents: 2
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 1
Open Issues: 0
Type:contao-bundle
Requires
- php: ^8.1
- contao/core-bundle: ^4.13 || ^5.3
- scssphp/scssphp: ^1.12
- symfony/config: ^5.4 || ^6.4 || ^7.0
- symfony/console: ^5.4 || ^6.4 || ^7.0
- symfony/dependency-injection: ^5.4 || ^6.4 || ^7.0
- symfony/event-dispatcher: ^5.4 || ^6.4 || ^7.0
- symfony/http-kernel: ^5.4 || ^6.4 || ^7.0
Requires (Dev)
- contao/contao-rector: @dev
- contao/easy-coding-standard: ^6.12
- contao/manager-plugin: ^2.3.1
- phpstan/phpstan: ^1.0
- phpstan/phpstan-doctrine: ^1.3
- phpstan/phpstan-phpunit: ^1.0
- phpstan/phpstan-symfony: ^1.0
- shipmonk/composer-dependency-analyser: ^1.5
- slam/phpstan-extensions: ^6.0
- thecodingmachine/phpstan-strict-rules: ^1.0
Conflicts
- contao/core: *
- contao/manager-plugin: <2.0 || >=3.0
README
The contao theme compiler bundle adds the functionality to compile selected scss files within your theme settings.
Features
- Compiles your scss files in your contao installation
- A compile button next to your themes
- Able to add multiple source files
- Able to compile multiple files into one
- Enable backups for your compiled scss
How to install the package
Via composer
composer require oveleon/contao-theme-compiler-bundle
Via contao-manager
Search for contao theme compiler bundle and add it to your extensions.
Initial setup
-
Create a theme and add source file/s in your theme settings
-
Add a destination folder for your source files
-
(Optional settings for combining your files and more)
-
Save
-
Compile in your theme-settings, within your theme overview, under maintenance or via console command
php vendor/bin/contao-console contao:themecompiler:compile [id]
Console commands
List themes
- Outputs a list of your themes within
tl_theme
php vendor/bin/contao-console contao:themecompiler:list
Compile theme
- Compiles a theme ([id] is mandatory):
php vendor/bin/contao-console contao:themecompiler:compile [id]
Miscellaneous
Enable file sync on every compilation
Version 1.8 has been rewritten to skip the DBAFS sync if the files already exist. This saves a database call and logic for each output file and improves compilation time.
To enable the old behaviour, use following in your config.yaml
# config/config.yml contao_theme_compiler: file_sync: true