This integrates a Sass compiler so users can compile files on the fly online. I think compiling files that way is never recommended but I understand that it can help some users.
Main features
Sass compilation can be enabled/disabled form a backend setting
System automatically detects files that need to be updated/refreshes. So when the Sass files are not changed page loading time won't be affected.
Based on leafo/scss library which is the strongest sass compiler nowadays.
System supports an optional _custom.css that users can create to add their own logic with Sass. That file won't be replaced by updates so it's safe to modify.
How to test
Install the template on a Joomla website
Go to template parameters and set to Yes a new parameter called Compile Sass
Load frontend and check that a message is shown with the Sass compilation information. I left that message explicitly so nobody forgets to disable Sass compiling when editing sass files is finished.
Create/edit templates/masterbootstrap/scss/template/_custom.scss to add some custom CSS rules there.
Reload page and see that Sass files are compiled and CSS styles applied.
Reload page again without modifying any scss file to test that cache check works.
Extra notes
I haven't gitignored composer libraries because it will be useful for you to test them if you are not familiar with composer. So this works 100% independently without requiring you to do anything. The right way would be to gitignore them and only execute composer install when you are releasing a new version of the template.
The library Phproberto\Sass\FileCompiler it's going to be moved to its own repo but that will only require you to change composer.json file. I will contribute that change when I publish it on packagist.
Originally I had added bootstrap sass files because I think is always better to load a unique css file with bootstrap + template settings there. I removed it because it could conflict with your current system that uses different bootstrap files for different styles. But if you think that having everything compiled into the same file I will be happy to do it.
Description
This integrates a Sass compiler so users can compile files on the fly online. I think compiling files that way is never recommended but I understand that it can help some users.
Main features
How to test
Compile Sass
templates/masterbootstrap/scss/template/_custom.scss
to add some custom CSS rules there.Extra notes
Phproberto\Sass\FileCompiler
it's going to be moved to its own repo but that will only require you to changecomposer.json
file. I will contribute that change when I publish it on packagist.