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

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

max-dreamsoft/yii2-asset-converter
==================================

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

2.1.0(8y ago)0116BSD-3-ClausePHPPHP &gt;=5.4.0

Since Sep 14Pushed 8y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (6)Versions (25)Used By (0)

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 libraries It replace the AssetConverter who use external tools. The Less and Sass file are converted with time source files dependency.

\###Requirements

YII 2.0

\###Usage

1. Install with Composer

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

php composer.phar update
```

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

```
    'assetManager' => [
        'bundles' => require(__DIR__ . '/assets.php'),
        'converter'=> [
            'class'=>'dreamsoft\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 [
	'app' => [
		'basePath' => '@webroot',
		'baseUrl' => '@web',
        'css' => [
			'css/bootstrap.min.css',
			'css/bootstrap-responsive.min.css',
			'css/site.css',
            'css/less_style.less',
            'css/sass_style.sass',
		],
		'js' => [

		],
		'depends' => [
			'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' => [
	'assetManager' => [
        'converter'=> [
            'class'=> 'dreamsoft\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
            'destinationDirPerms' => 0755, // permissions to assign to destinationDir
            'recursiveRecompileCheck' => false, // check timestamps of all source siblings and children
            'parsers' => [
                'sass' => [ // file extension to parse
                    'class' => 'dreamsoft\assetConverter\Sass',
                    'output' => 'css', // parsed output file type
                    'options' => [
                        'cachePath' => '@app/runtime/cache/sass-parser' // optional options
                    ],
                ],
                'scss' => [ // file extension to parse
                    'class' => 'dreamsoft\assetConverter\Scss',
                    'output' => 'css', // parsed output file type
                    'options' => [] // optional options
                ],
                'less' => [ // file extension to parse
                    'class' => 'dreamsoft\assetConverter\Less',
                    'output' => 'css', // parsed output file type
                    'options' => [
                        'auto' => true, // optional options
                    ]
                ]
            ]
        ]
    ],
],
```

Also, for SCSS files you can use alternate configuration:

```
'components' => [
    'assetManager' => [
            'converter'=> [
                // ...
                'parsers' => [
                    // ...
                    'scss' => [ // file extension to parse
                        'class' => 'dreamsoft\assetConverter\Scss',
                        'output' => 'css', // parsed output file type
                        'options' => [ // optional options
                            'enableCompass' => true, // default is true
                            'importPaths' => [], // 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
                            'generateMap' => false, // if true — compiler will generate map **
                            'outputStyle' => 'nested', // May be `compressed`, `crunched`, `expanded` or `nested`,
                                // see more at http://sass-lang.com/documentation/file.SASS_REFERENCE.html#output_style
                        ],
                    ],
                ],
            ],
        ],
    // ...
```

\*\* possible values for generateMap are:

- `\Leafo\ScssPhp\Compiler::SOURCE_MAP_FILE`
- `\Leafo\ScssPhp\Compiler::SOURCE_MAP_INLINE`
- all (bin) positive values are `SOURCE_MAP_FILE`
- all (bin) negative values are `SOURCE_MAP_NONE`

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 61.7% 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 ~69 days

Recently: every ~191 days

Total

24

Last Release

3021d ago

Major Versions

v1.3.0 → 2.0.02016-12-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/407a1496d58014850c858022fdd684bb54b88e6e0885fd8993463f5b36d2bff7?d=identicon)[max-dreamsoft](/maintainers/max-dreamsoft)

---

Top Contributors

[![nizsheanez](https://avatars.githubusercontent.com/u/686798?v=4)](https://github.com/nizsheanez "nizsheanez (66 commits)")[![mervick](https://avatars.githubusercontent.com/u/2429298?v=4)](https://github.com/mervick "mervick (12 commits)")[![max-dreamsoft](https://avatars.githubusercontent.com/u/16354564?v=4)](https://github.com/max-dreamsoft "max-dreamsoft (9 commits)")[![athos99](https://avatars.githubusercontent.com/u/208224?v=4)](https://github.com/athos99 "athos99 (8 commits)")[![Blizzke](https://avatars.githubusercontent.com/u/231572?v=4)](https://github.com/Blizzke "Blizzke (3 commits)")[![hammer9999](https://avatars.githubusercontent.com/u/8984732?v=4)](https://github.com/hammer9999 "hammer9999 (1 commits)")[![ilgiz-badamshin](https://avatars.githubusercontent.com/u/7591988?v=4)](https://github.com/ilgiz-badamshin "ilgiz-badamshin (1 commits)")[![dima-gusyatiner](https://avatars.githubusercontent.com/u/6461669?v=4)](https://github.com/dima-gusyatiner "dima-gusyatiner (1 commits)")[![cyberinferno](https://avatars.githubusercontent.com/u/1510205?v=4)](https://github.com/cyberinferno "cyberinferno (1 commits)")[![philippfrenzel](https://avatars.githubusercontent.com/u/2319890?v=4)](https://github.com/philippfrenzel "philippfrenzel (1 commits)")[![RdeWilde](https://avatars.githubusercontent.com/u/184016?v=4)](https://github.com/RdeWilde "RdeWilde (1 commits)")[![skotos](https://avatars.githubusercontent.com/u/1259908?v=4)](https://github.com/skotos "skotos (1 commits)")[![firstrow](https://avatars.githubusercontent.com/u/66944?v=4)](https://github.com/firstrow "firstrow (1 commits)")[![uniqby](https://avatars.githubusercontent.com/u/1488394?v=4)](https://github.com/uniqby "uniqby (1 commits)")

---

Tags

convertersassscsslessyii2yiiassetcompass

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/max-dreamsoft-yii2-asset-converter/health.svg)](https://phpackages.com/packages/max-dreamsoft-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

64167.5k6](/packages/nizsheanez-yii2-asset-converter)[scssphp/scssphp

scssphp is a compiler for SCSS written in PHP.

62827.7M220](/packages/scssphp-scssphp)[trentrichardson/cakephp-shrink

Compiles, combines, and minifies javascript, coffee, less, scss, and css

1619.3k](/packages/trentrichardson-cakephp-shrink)

PHPackages © 2026

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