Answer the question
In order to leave comments, you need to log in
Show on your fingers how to use LESS in YII2?
The bottom line, I installed yii2 basic for tests (in general, I'm perfectly familiar with the framework)
So, a clean installation, I'm trying to find where the legs of .less files grow from.
aha, vendor/bower/bootstrap
Next, I thought I could fix the .less file, and when I change the assets, it will be replaced. But no. This is where I stopped 3 months ago.
Today I found that the less file itself is formed in bootstrap-theme.css.map, and all .less files are written there.
So what should I do to change the .less files and they are written to this bootstrap-theme.css.map file? Or what needs to be done in general to change the .less files, and these changes are implemented on the site in .less files?
Answer the question
In order to leave comments, you need to log in
As an option:
add an extension like this:
in the config:
'assetManager' => [
'converter'=> [
'class'=>'nizsheanez\assetConverter\Converter',
'destinationDir' => '', //at which folder of @webroot put compiled files
'parsers' => [
'less' => [ // file extension to parse
'class' => 'nizsheanez\assetConverter\Less',
'output' => 'css', // parsed output file type
'options' => [
'auto' => true, // optional options
]
]
]
]
],
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question