arter/yii2-less.php

There is no license information available for the latest version (1.0.0) of this package.

This is a Yii2 wrapper extension for PHP port of the official LESS processor http://lesscss.org.

This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.

Maintainers

👁 art-er

Package info

repo.aster.it/elitedivision/yii2-less.php

Type:yii2-extension

pkg:composer/arter/yii2-less.php

Statistics

Installs: 601

Dependents: 1

Suggesters: 0

1.0.0 2022-05-04 16:00 UTC

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

Unknown License 3a18c4f05d8506170a3cda13f45e289c0a0515c9

  • cakebake (Jens A.) <cakebake.dev.woop@gmail.com>

phpassetscsslessextensionbundlesconverterassetmanageryii2less.phpoyejorge

This package is auto-updated.

Last update: 2025-06-24 23:02:30 UTC


README

This is a Yii2 wrapper extension for PHP port of the official LESS processor http://lesscss.org.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist cakebake/yii2-less.php "*"

or add

"cakebake/yii2-less.php": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it (without dots) in your config:

$config = [
 ...
 'components' => [
		...
 'assetManager' => [
 ...
 'converter' => [
 'class' => 'cakebake\lessphp\AssetConverter',
 'compress' => true, // Optional: You can tell less.php to remove comments and whitespace to generate minimized css files.
 'useCache' => true, // Optional: less.php will save serialized parser data for each .less file. Faster, but more memory-intense.
 //'cacheDir' => null, // Optional: is passed to the SetCacheDir() method. By default "cakebake\lessphp\runtime" is used.
 'cacheSuffix' => true, // Optional: Filename suffix to avoid the browser cache and force recompiling by configuration changes
 ],
			...
 ],
		...
	],
	...
];

So if it is configured you can specify your less files in asset bundle:

class AppAsset extends AssetBundle
{
 public $basePath = '@webroot';
 public $baseUrl = '@web';
 public $css = [
 'css/site.less',
 ];
 public $js = [
 ];
 public $depends = [
 ];
}