How to install PHP SCSS compiler?


(Tbaatar) #1

Hi,

I noticed in the new Matrix 5.4.0 there is the possibility to use SCSS and there is no documentation available.

I tried couple of compilers without a success much success.

Any hints/tips much appreciated.

Thanks.


(Bart Banda) #2

No documentation available yet on the manuals as 5.4 is not yet released, but you need to install “scssphp” compiler in the system and point the repo’s path in the new external tool config setting “SQ_TOOL_SCSSPHP_PATH”.

From here: https://github.com/leafo/scssphp/

More info on https://squizmap.squiz.net/matrix/9778


(Tbaatar) #3

Thanks Bart,

Will give this a go.

Thanks,
Tuguldur


(Rob) #4

Hi Tba!

Sorry to raise this in your thread, but did you get this working? I’m trying to follow the guide to install the SCSSPHP compiler but cannot for the life of me see where it needs to be installed to and where to point to it via the System Config interface!

Cheers

Rob


(Tbaatar) #5

Hi Rob,

I didn’t get it working at the time and even with Squiz paid upgrade they said the package was not available for the version of Debain we were using (back in Jan 2018).

It hasn’t been much of a problem for us because most of the CSS/SCSS is done through Git File Bridge asset.

The new Matrix 5.5.1.5 version installs SCSSPHP, markdown and couple other packages automatically so it might be worth upgrading?


(Rob) #6

I think I need a little cry. I don’t think we’ll be upgrading any time soon due to it potentially affecting other sites that sit on the server using Squiz and the file bridge asset doesn’t work because of the Clearswift issue (from my post about the Twitter API haha).

Thank you for coming back to me so quickly though and on my other thread! Really appreciate it :slight_smile:


(Chiranjivi Upreti) #7

As per the manual, phttps://matrix.squiz.net/manuals/designs/chapters/scss-design-file, you will need to do this:

  1. checkout https://github.com/leafo/scssphp/ somewhere in you server, say /usr/share/php/scss
  2. tell Matrix PHP SCSS compiler location i.e. edit data/private/conf/tools.inc file and set SQ_TOOL_SCSSPHP_PATH to where you checked the compiler, i.e. (as per above path):
    define('SQ_TOOL_SCSSPHP_PATH', '/usr/share/php/scss');
  3. and you are all set!

To verify the installation you can go to External Tools and check “SCSSPHP Compiler” displaying the above set installation path.
You shouldn’t see the warning “The path to SCSSPHP is not valid” if the installation was successful.


(Rob) #8

Thanks for the Response Chiranjivi! I’ll have a look at following this. From a usability perspective it would be worth adding this wording to the manual as I don’t think it’s particularly clear.

Cheers

Rob