PHPackages                             csegedicsaba/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. [Templating &amp; Views](/categories/templating)
4. /
5. csegedicsaba/yii2-asset-converter

ActiveYii2-extension[Templating &amp; Views](/categories/templating)

csegedicsaba/yii2-asset-converter
=================================

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

2.0.0(7y ago)0237BSD-3-ClausePHPPHP &gt;=5.4.0

Since Sep 14Pushed 7y agoCompare

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

READMEChangelog (1)Dependencies (6)Versions (24)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": {
    "nizsheanez/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'=>'nizsheanez\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'=> 'nizsheanez\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' => [
                'sass' => [ // file extension to parse
                    'class' => 'nizsheanez\assetConverter\Sass',
                    'output' => 'css', // parsed output file type
                    'options' => [
                        'cachePath' => '@app/runtime/cache/sass-parser' // optional options
                    ],
                ],
                'scss' => [ // file extension to parse
                    'class' => 'nizsheanez\assetConverter\Sass',
                    'output' => 'css', // parsed output file type
                    'options' => [] // optional options
                ],
                'less' => [ // file extension to parse
                    'class' => 'nizsheanez\assetConverter\Less',
                    'output' => 'css', // parsed output file type
                    'options' => [
		    	'importDirs' => [], // import paths, you may use path alias here ex. '@app/assets/common/less'
                        'auto' => true, // optional options
                    ]
                ]
            ]
        ]
    ],
],
```

Also, for SCSS files you can use alternate configuration:

```
'components' => [
    'assetManager' => [
            'converter'=> [
                // ...
                'parsers' => [
                    // ...
                    'scss' => [ // file extension to parse
                        'class' => 'nizsheanez\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
                            '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

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 66.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 ~91 days

Recently: every ~305 days

Total

23

Last Release

2608d ago

Major Versions

v1.5.0 → 2.0.02019-03-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/98ac1059346ea83a46b606a9db16b5d5217ffcd4c818966f0ea30006d30c1b92?d=identicon)[csegedicsaba](/maintainers/csegedicsaba)

---

Top Contributors

[![nizsheanez](https://avatars.githubusercontent.com/u/686798?v=4)](https://github.com/nizsheanez "nizsheanez (68 commits)")[![mervick](https://avatars.githubusercontent.com/u/2429298?v=4)](https://github.com/mervick "mervick (12 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)")[![petrovich24](https://avatars.githubusercontent.com/u/20962964?v=4)](https://github.com/petrovich24 "petrovich24 (2 commits)")[![firstrow](https://avatars.githubusercontent.com/u/66944?v=4)](https://github.com/firstrow "firstrow (1 commits)")[![csegedicsaba](https://avatars.githubusercontent.com/u/33460858?v=4)](https://github.com/csegedicsaba "csegedicsaba (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)")[![uniqby](https://avatars.githubusercontent.com/u/1488394?v=4)](https://github.com/uniqby "uniqby (1 commits)")[![cyberinferno](https://avatars.githubusercontent.com/u/1510205?v=4)](https://github.com/cyberinferno "cyberinferno (1 commits)")[![vuquangthinh](https://avatars.githubusercontent.com/u/1710072?v=4)](https://github.com/vuquangthinh "vuquangthinh (1 commits)")[![dima-gusyatiner](https://avatars.githubusercontent.com/u/6461669?v=4)](https://github.com/dima-gusyatiner "dima-gusyatiner (1 commits)")

---

Tags

convertersassscsslessyii2yiiassetcompassphamlp

### Embed Badge

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

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

Compiles your SASS .scss files to .css every time your run your app (in development)

12280.0k](/packages/panique-php-sass)

PHPackages © 2026

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