PHP code example of elephfront / robo-sass

1. Go to this page and download the library: Download elephfront/robo-sass library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

elephfront / robo-sass example snippets


use Elephfront\RoboSass\Task\Loader\LoadSassTaskTrait;

class RoboFile extends Tasks
{

    use LoadSassTaskTrait;
    
    public function compileSass()
    {
        $this
            ->taskSass([
                'assets/scss/main.scss' => 'assets/min/css/main.min.css',
                'assets/scss/home.scss' => 'assets/min/css/home.min.css',
            ])
            ->run();
    }
}

$data = [
    'path/to/source/file' => [
        'css' => '// Some (S)CSS code',
        'destination' => 'path/to/destination/file
    ]
];

$this
    ->taskCssMinify([
        'assets/scss/main.css' => 'assets/min/css/main.min.css',
        'assets/scss/home.css' => 'assets/min/css/home.min.css',
    ])
        ->disableWriteFile()
    ->someOtherTask()
    ->run();

git clone git://github.com/absalomedia/sassphp`
cd sassphp
git submodule init
git submodule update
php install.php
make test
make install