Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'File Skip' support #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

ChrGriffin
Copy link

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
Copy link

vkaterusha commented Jan 31, 2017

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

None yet

2 participants