public function run($scss_folder, $format_style = "scss_formatter")
    {

        // scssc will be loaded automatically via Composer
        $scss_compiler = new Compiler();
        $bootstrap_folder = __DIR__.'/../../../../../../node_modules/bootstrap/scss';
        $flag_folder = __DIR__.'/../../../../../../node_modules/flag-icon-css/sass'; 
        // set the path where your _mixins are
        $scss_compiler->setImportPaths(array($flag_folder,$bootstrap_folder,$scss_folder));
        // set css formatting (normal, nested or minimized), @see http://leafo.net/scssphp/docs/#output_formatting
         $scss_compiler->setFormatter('Leafo\ScssPhp\Formatter\Compressed');
        // get all .scss files from scss folder
        $filelist = glob($scss_folder . "/*.scss");
        // step through all .scss files in that folder
        foreach ($filelist as $file_path) {
            // get path elements from that file
            $file_path_elements = pathinfo($file_path);
            // get file's name without extension
            $file_name = $file_path_elements['filename'];
            // get .scss's content, put it into $string_sass
            $string_sass = file_get_contents($scss_folder .'/'. $file_name . ".scss");
            // compile this SASS code to CSS
            $string_css = $scss_compiler->compile($string_sass);
            $this->container['FileManager']->add('text/css', '/css/'. $file_name . ".css", $string_css);
        }
    }
public function run($scss_folder, $format_style = "scss_formatter")
    {

        // scssc will be loaded automatically via Composer
        $scss_compiler = new Compiler();
        $bootstrap_folder = __DIR__.'/../../../../../../node_modules/bootstrap/scss';
        $flag_folder = __DIR__.'/../../../../../../node_modules/flag-icon-css/sass'; 
        // set the path where your _mixins are
        $scss_compiler->setImportPaths(array($flag_folder,$bootstrap_folder,$scss_folder));
        // set css formatting (normal, nested or minimized), @see http://leafo.net/scssphp/docs/#output_formatting
         $scss_compiler->setFormatter('Leafo\ScssPhp\Formatter\Compressed');
        // get all .scss files from scss folder
        $filelist = glob($scss_folder . "/*.scss");
        // step through all .scss files in that folder
        foreach ($filelist as $file_path) {
            // get path elements from that file
            $file_path_elements = pathinfo($file_path);
            // get file's name without extension
            $file_name = $file_path_elements['filename'];
            // get .scss's content, put it into $string_sass
            $string_sass = file_get_contents($scss_folder .'/'. $file_name . ".scss");
            // compile this SASS code to CSS
            $string_css = $scss_compiler->compile($string_sass);
            $this->container['FileManager']->add('text/css', '/css/'. $file_name . ".css", $string_css);
        }
    }
public function run ( $ scss_folder , $ format_style = "scss_formatter" ) { // scssc will be loaded automatically via Composer $ scss_compiler = new Compiler ( ) ; $ bootstrap_folder = __DIR__ . '/../../../../../../node_modules/bootstrap/scss' ; $ flag_folder = __DIR__ . '/../../../../../../node_modules/flag-icon-css/sass' ; // set the path where your _mixins are $ scss_compiler -> setImportPaths ( array ( $ flag_folder , $ bootstrap_folder , $ scss_folder ) ) ; // set css formatting (normal, nested or minimized), @see http://leafo.net/scssphp/docs/#output_formatting $ scss_compiler -> setFormatter ( 'Leafo\ScssPhp\Formatter\Compressed' ) ; // get all .scss files from scss folder $ filelist = glob ( $ scss_folder . "/*.scss" ) ; // step through all .scss files in that folder foreach ( $ filelist as $ file_path ) { // get path elements from that file $ file_path_elements = pathinfo ( $ file_path ) ; // get file's name without extension $ file_name = $ file_path_elements [ 'filename' ] ; // get .scss's content, put it into $string_sass $ string_sass = file_get_contents ( $ scss_folder . '/' . $ file_name . ".scss" ) ; // compile this SASS code to CSS $ string_css = $ scss_compiler -> compile ( $ string_sass ) ; $ this -> container [ 'FileManager' ] -> add ( 'text/css' , '/css/' . $ file_name . ".css" , $ string_css ) ; } }
Compiles all .scss files in a given folder into .css files in a given folder

@param string $scss_folder source folder where you have your .scss files
@param string $css_folder destination folder where you want your .css files
@param string $format_style CSS output format, see http://leafo.net/scssphp/docs/#output_formatting for more.
Compiles all . scss files in a given folder into . css files in a given folder