public function compile($lessFile, $basePath = null)
    {
        try {
            $basePath = $this->_prepareBasepath($basePath, dirname($lessFile));

            $cache = new Cache($this->_options);
            $cache->setFile($lessFile, $basePath);

            $isExpired = $cache->isExpired();
            $isForce   = $this->_options->get('force', false, 'bool');

            if ($isForce || $cache->isExpired()) {
                $result = $this->_driver->compile($lessFile, $basePath);
                $cache->save($result);
            }

            $isExpired = ($isForce) ? true : $isExpired;
            $return = [FS::clean($cache->getFile(), '/'), $isExpired];

        } catch (\Exception $e) {
            $message = 'Less error: ' . $e->getMessage();
            throw new Exception($message);
        }

        return $return;
    }
public function compile($lessFile, $basePath = null)
    {
        try {
            $basePath = $this->_prepareBasepath($basePath, dirname($lessFile));

            $cache = new Cache($this->_options);
            $cache->setFile($lessFile, $basePath);

            $isExpired = $cache->isExpired();
            $isForce   = $this->_options->get('force', false, 'bool');

            if ($isForce || $cache->isExpired()) {
                $result = $this->_driver->compile($lessFile, $basePath);
                $cache->save($result);
            }

            $isExpired = ($isForce) ? true : $isExpired;
            $return = [FS::clean($cache->getFile(), '/'), $isExpired];

        } catch (\Exception $e) {
            $message = 'Less error: ' . $e->getMessage();
            throw new Exception($message);
        }

        return $return;
    }
public function compile ( $ lessFile , $ basePath = null ) { try { $ basePath = $ this -> _prepareBasepath ( $ basePath , dirname ( $ lessFile ) ) ; $ cache = new Cache ( $ this -> _options ) ; $ cache -> setFile ( $ lessFile , $ basePath ) ; $ isExpired = $ cache -> isExpired ( ) ; $ isForce = $ this -> _options -> get ( 'force' , false , 'bool' ) ; if ( $ isForce || $ cache -> isExpired ( ) ) { $ result = $ this -> _driver -> compile ( $ lessFile , $ basePath ) ; $ cache -> save ( $ result ) ; } $ isExpired = ( $ isForce ) ? true : $ isExpired ; $ return = [ FS :: clean ( $ cache -> getFile ( ) , '/' ) , $ isExpired ] ; } catch ( \ Exception $ e ) { $ message = 'Less error: ' . $ e -> getMessage ( ) ; throw new Exception ( $ message ) ; } return $ return ; }
Compile less file.

@param string $lessFile
@param null|string $basePath
@return array
@throws Exception
Compile less file .