如何使用这两个库将scss文件(使用指南针mixins / features)编译成php中的css?

I have a lot of scss files that are neatly organised into folders and linked to each other via @import and I need to compile them into css on the server side in php on the fly. One of the files [application.scss] links to all the files which then link to all the other scss files via lots of @import. So I just need to pass application.scss to these two libraries and they should do the rest.

I have been using this https://github.com/leafo/scssphp PHPSCSS and it was working perfectly fine until I started coming across errors "undefined mixin X/Y/Z", but then I realised that scss files I am using have been written using compass which then led me into using this https://github.com/leafo/scssphp-compass PHPSCSS-COMPASS with this piece of code/example working perfectly fine:

require "compass.inc.php";
require "scss.inc.php";
$scss = new scssc();
new scss_compass($scss);

echo $scss->compile('
        @import "compass";

        .shadow {

         @include box-shadow(10px 10px 8px red);

       }
');

The problem is, its not practical nor feasible for me to pass all scss code as a string in the place of .shadow {@include box-shadow( 10px 10px 8px red); } I need to pass in application.scss file not scss code snippet. I tried doing this but it didnt work:

require "compass.inc.php";
require "scss.inc.php";
$scss = new scssc();
new scss_compass($scss);

echo $scss->compile('
        @import "compass";

        "application.scss"
');

This did not work either:

$scss = new scssc();
new scss_compass($scss);
$server = new scss_server("sass",null,$scss);
$server->serve();

Nor did this:

$scss = new scssc();
new scss_compass($scss);
$scss->setImportPaths("sass/");
echo $scss->compile('@import "compass"');
echo $scss->compile('@import "application.scss"');

Could anyone help ?