H
H
hollanditkzn2017-10-23 17:02:19
Yii
hollanditkzn, 2017-10-23 17:02:19

How to compress css file?

I don’t understand a little how to make css like min.css. I tried to use asset manager but for some reason it didn't work
for me I already have the configuration in frontend/config/main.php

'assetManager' => [
            'bundles' => [
                'yii\web\JqueryAsset' => [
                    'sourcePath' => null,
                    'js' => [
                        '//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'
                    ]
                ],
                'yii\bootstrap\BootstrapPluginAsset' => [
                    'sourcePath' => null,
                    'js' => [
                        'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js'
                    ]
                ],
                'yii\bootstrap\BootstrapAsset' => [
                    'sourcePath' => null,
                    'css' => [
                        'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'
                    ]
                ]
            ],
            'appendTimestamp' => true
        ],

I did this by minifying the jquery and bootstrap libraries.
When I specified yii asset/template assets.php in the console, the file was created in the root folder
. And when I try to run compress or config, I get an error all the time. For compress Error: ╨░╤А╨│╤Г╨╝╨╡╨╜╤В╤L: bundleFile
A for config Exception 'yii\base\InvalidConfigException' with message 'The directory does not exist: C:\OpenServer\domains\crm/. ./web/assets'
Although there is a directory in principle. Help deal with this

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question