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

Addition of partials modified date check & clear_cache method update #42

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

Conversation

stevenwoodson
Copy link
Contributor

  • Updated to remove the clear_cache group check, assets in groups were not being removed when new ones were generated
  • Update to library to check for @include partials in SASS/SCSS

@GrupoWebex
Copy link

All commit request are not working correctly.... so it has conflict with other groups, other types, clearing when is not necessary
That's my code working. Clear cache not tested.
Group names cant end with same chars (ex. adminApp, otherApp). Have to be appOne, appTwo.

                if ($files)
		{
			foreach ($files as $file)
			{
				$file_path = reduce_double_slashes(self::$cache_path.'/'.$file);
				$file_info = pathinfo($file_path);

				if ( ( ( $group !== null && stripos($file_path, $group .'.') !== false ) || $group === null ) && $type === 'css' )
				{
					if (isset($file_info['extension']) and strtolower($file_info['extension']) === 'css') unlink($file_path);
				}
				elseif ( ( ( $group !== null && stripos($file_path, $group .'.') !== false ) || $group === null ) && $type === 'js' )
				{
					if (isset($file_info['extension']) and strtolower($file_info['extension']) === 'js') unlink($file_path);
				}
				elseif($group === null)
				{
					if (isset($file_info['extension']) and (strtolower($file_info['extension']) === 'css' or strtolower($file_info['extension']) === 'js')) unlink($file_path);
					if (isset($file_info['extension']) and strtolower($file_info['extension']) === 'cache') unlink($file_path);
				}

			}
		}

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