PHPackages                             quanzo/x51-frontend - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. quanzo/x51-frontend

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

quanzo/x51-frontend
===================

Compile scss. Packed js and css

1.0.1(6y ago)081MITPHPPHP &gt;=7.0

Since Aug 30Pushed 6y ago1 watchersCompare

[ Source](https://github.com/quanzo/x51-frontend)[ Packagist](https://packagist.org/packages/quanzo/x51-frontend)[ RSS](/packages/quanzo-x51-frontend/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (4)Versions (4)Used By (1)

Compress css and js
===================

[](#compress-css-and-js)

How to use
----------

[](#how-to-use)

Generating a CSS from SCS takes more time. Do not use without caching.

```
    $bender = new \x51\classes\frontend\Bender(
        [ // path to use in @import in scss files (if need)
            'path/to/scss/lib.scss'
        ],
        -1 // never update (only if the file is missing)
        // 3600 - set 1 hour time to live
    );
    // adv options
    $bender->functionsConfig = 'path/to/scss-functions.php';
    $bender->variablesConfig = 'path/to/scss-vars.php';
    // or set array
    $bender->functionsConfig = [];
    $bender->variablesConfig = [];

    // array of css files to packed
    $arCssFiles = [
        'path/to/file.css',
        'path/to/file.scss',
    ];
    // array of js files to packed
    $arJsFiles = [
        'path/to/js.js'
    ];

    echo $bender->output('document-root-file.css', $arCssFiles); //
    echo $bender->output('document-root-file.js', $arJsFiles); //
```

### Example *scss-vars.php*

[](#example-scss-varsphp)

```
