PHPackages                             jarrus90/yii2-asset-converter - 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. jarrus90/yii2-asset-converter

AbandonedArchivedYii2-extension[Utility &amp; Helpers](/categories/utility)

jarrus90/yii2-asset-converter
=============================

Sass, Scss converter for Yii2. No system requires. yii2-composer support, customizing of output directory

1.0.7(10y ago)1267BSD-3-ClausePHPPHP &gt;=5.4.0

Since Nov 6Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jarrus90/yii2-asset-converter)[ Packagist](https://packagist.org/packages/jarrus90/yii2-asset-converter)[ RSS](/packages/jarrus90-yii2-asset-converter/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (3)Versions (9)Used By (0)

yii2-asset-converter
====================

[](#yii2-asset-converter)

Only for YII2 with the new Asset Manager, convert Less and Sass files to CSS whithout external tools and executable. The sass and less files are converted with PHP librairies It replace the AssetConverter who use external tools. The Less and Sass file are converted with time source files dependency.

> **NOTE:** Module is in initial development. Anything may change at any time.

Contributing to this project
----------------------------

[](#contributing-to-this-project)

Anyone and everyone is welcome to contribute. Please take a moment to review the [guidelines for contributing](CONTRIBUTING.md).

License
-------

[](#license)

Yii2-asset-converter is released under the BSD-3-Clause License. See the bundled [LICENSE.md](LICENSE.md) for details.

\##Requirements

YII 2.0

\##Usage

1. Install with Composer

```
"require": {
    "jarrus90/yii2-asset-converter": "1.*",
},

php composer.phar update
```

2. Modify assetManager in your configuration file {app}/protected/config/main.php

```
    'assetManager' => array(
        'bundles' => require(__DIR__ . '/assets.php'),
        'converter'=>array(
            'class'=>'jarrus90\assetConverter\Converter',
        )
    ),
```

3. Create .gitignore in
4. Enjoy!

- Files with extension .sass are converted to a .css file
- Files with extension .less are converted to a .css file
- Files with extension .scss are converted to a .css file

\##Example of assets config file /protected/config/assets.php

```
return array(
    'app' => array(
        'basePath' => '@webroot',
        'baseUrl' => '@web',
        'css' => array(
            'css/bootstrap.min.css',
            'css/bootstrap-responsive.min.css',
            'css/site.css',
            'css/less_style.less',
            'css/sass_style.sass',
        ),
        'js' => array(
        ),
        'depends' => array(
            'yii',
        ),
    ),
);
```

\##Where is compiled files?

By default it present at @webroot/compiled But you can change it by destinationDir property from config

Full configuration
------------------

[](#full-configuration)

```
'components' => array(
	'assetManager' => array(
        'converter'=>array(
            'class'=>'jarrus90\assetConverter\Converter',
            'force'=>false, // true : If you want convert your sass each time without time dependency
            'destinationDir' => 'compiled', //at which folder of @webroot put compiled files
            'parsers' => array(
                'sass' => array( // file extension to parse
                    'class' => 'jarrus90\assetConverter\Sass',
                    'output' => 'css', // parsed output file type
                    'options' => array(
                        'cachePath' => '@app/runtime/cache/sass-parser' // optional options
                    ),
                ),
                'scss' => array( // file extension to parse
                    'class' => 'jarrus90\assetConverter\Sass',
                    'output' => 'css', // parsed output file type
                    'options' => array() // optional options
                ),
            )
        )
    ),
),
```

Also, for SCSS files you can use alternate configuration:

```
'components' => array(
    'assetManager' => array(
            'converter'=>array(
                // ...
                'parsers' => array(
                    // ...
                    'scss' => array( // file extension to parse
                        'class' => 'jarrus90\assetConverter\Scss',
                        'output' => 'css', // parsed output file type
                        'options' => array( // optional options
                            'enableCompass' => true, // default is true
                            'importPaths' => array(), // import paths, you may use path alias here,
                                // e.g., `['@path/to/dir', '@path/to/dir1', ...]`
                            'lineComments' => false, // if true — compiler will place line numbers in your compiled output
                            'outputStyle' => 'nested', // May be `compressed`, `crunched`, `expanded` or `nested`,
                                // see more at http://sass-lang.com/documentation/file.SASS_REFERENCE.html#output_style
                        ),
                    ),
                ),
            ),
        ),
    // ...
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

8

Last Release

3890d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/564296?v=4)[jarrus](/maintainers/jarrus)[@Jarrus](https://github.com/Jarrus)

---

Top Contributors

[![jarrus90](https://avatars.githubusercontent.com/u/2892668?v=4)](https://github.com/jarrus90 "jarrus90 (17 commits)")

---

Tags

convertersassscssyii2yiiassetcompass

### Embed Badge

![Health badge](/badges/jarrus90-yii2-asset-converter/health.svg)

```
[![Health](https://phpackages.com/badges/jarrus90-yii2-asset-converter/health.svg)](https://phpackages.com/packages/jarrus90-yii2-asset-converter)
```

###  Alternatives

[nizsheanez/yii2-asset-converter

Less, Sass, Scss and Phamlp converter for Yii2. No system requires. yii2-composer support, Less autoupdate, customizing of output directory

61170.8k6](/packages/nizsheanez-yii2-asset-converter)[brussens/yii2-maintenance-mode

Maintenance mode component for Yii framework 2.x.x version.

78263.0k5](/packages/brussens-yii2-maintenance-mode)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
