yii2-assets-auto-compress
yii2-assets-auto-compress copied to clipboard
'File Skip' support
Added support for the ability to skip specific files and have them render normally regardless of the assets compression.
Example:
'assetsAutoCompress' => [
'class' => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent',
'enabled' => TRUE,
'skip' => [
'scriptname.js',
]
],
And the end result on the page:
<script src="/assets/d905b4ac/scriptname.js"></script>
<script src="/assets/js-compress/6dc4a89b3dc86323accc70fe63033e53.js?v=1479571730"></script>
I needed it for my own project so I went ahead and wrote it. Should work with all JavaScript and CSS files, assuming they have unique filenames.
@skeeks-semenov I would need this feature too for my project. I want to exclude a css file from compression. In my case I have a fancybox gallery and it's the jquery.fancybox.css when compressed with other Yii2 assets not working as expected..