Skip to content
This repository has been archived by the owner on Mar 19, 2023. It is now read-only.

ignore_environments #29

Closed
mdubbelman opened this issue Apr 23, 2014 · 4 comments
Closed

ignore_environments #29

mdubbelman opened this issue Apr 23, 2014 · 4 comments

Comments

@mdubbelman
Copy link

Hi,

When I use the ignore_environments option, the minified files are still generated. The package just returns the path to the real files (not the minified ones).
I think it would be better when you're on a environment that needs to be ignored, the files are not minified. This is because whenever I change anything in the CSS or Javascript the minified files are re-generated and takes a lot of time.

@ceesvanegmond
Copy link
Owner

Could you try to debug it? I heard this issue before but cannot find the problem.

@jorygeerts
Copy link
Contributor

As far as I understand the code, what happens is that Minify\Minify::process() is called to add a file to the filelist, which then calls provider->minify() which calls JSMin or CssMinifier.
Later on, Minify\Minify::render() is called, which checks if minifycation should happen for the current environment and decides if the minfied file should be included or the raw files.

By adding the same environment check to Minify\Minify::process() we can prevent constant minification on development environments.

If you'd like, either Doublehomme or myself can send in a patch with these changes.

@ceesvanegmond
Copy link
Owner

Please submit a pull request!

@ceesvanegmond
Copy link
Owner

Merged! Thx!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants