1. Go to this page and download the library: Download lucidtaz/yii2-scssphp library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lucidtaz / yii2-scssphp example snippets
$config = [
// Other configuration...
'components' => [
'assetManager' => [
'converter' => 'lucidtaz\yii2scssphp\ScssAssetConverter',
],
// Other components...
],
// Other configuration...
];
namespace app\assets;
use yii\web\AssetBundle;
class AppAsset extends AssetBundle
{
public $sourcePath = '@app/assets/source';
public $css = [
'site.scss',
];
public $depends = [
'yii\web\YiiAsset',
'yii\bootstrap\BootstrapAsset',
];
}
$config = [
// Other configuration...
'components' => [
'assetManager' => [
'converter' => 'lucidtaz\yii2scssphp\ScssAssetConverter',
],
// Other components...
],
'container' => [
'definitions' => [
\ScssPhp\ScssPhp\Compiler::class => function () {
// You can also use a child class here:
$compiler = new \ScssPhp\ScssPhp\Compiler();
$compiler->setOutputStyle(\ScssPhp\ScssPhp\OutputStyle::COMPRESSED);
return $compiler;
}
],
],
// Other configuration...
];
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.