Skip to content

'File Skip' support - #25

Open
ChrGriffin wants to merge 2 commits into
skeeks-semenov:masterfrom
ChrGriffin:master
Open

'File Skip' support#25
ChrGriffin wants to merge 2 commits into
skeeks-semenov:masterfrom
ChrGriffin:master

Conversation

@ChrGriffin

Copy link
Copy Markdown

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.

Christian Griffin added 2 commits November 19, 2016 11:04
@vkaterusha

vkaterusha commented Jan 31, 2017

Copy link
Copy Markdown

@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..

@adoerler adoerler mentioned this pull request Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants