PHP code example of dotzero / yii-less

1. Go to this page and download the library: Download dotzero/yii-less 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/ */

    

dotzero / yii-less example snippets


'aliases' => array(
    ...
    'vendor' => realpath(__DIR__ . '/../../vendor'),
),
'components' => array(
    ...
    'less' => array(
        'class' => 'vendor.dotzero.yii-less.ELessCompiler',
        'lessphpDir' => 'vendor.leafo.lessphp', // Path alias of lessc.inc.php directory
        'forceCompile' => false, // Force recompile LESS into CSS every initializes the component
        'files' => array( // Files to compile (relative from your base path)
            'css/style.less' => 'css/style.css',
            'css/userstyle.less' => 'css/userstyle.css',
        ),
    ),
),

'preload' => array(
    ...
    'less',
),