assets-ci icon indicating copy to clipboard operation
assets-ci copied to clipboard

Addition of partials modified date check & clear_cache method update

Open stevenwoodson opened this issue 11 years ago • 1 comments

  • 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

stevenwoodson avatar Aug 01 '13 17:08 stevenwoodson

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);
				}

			}
		}

GrupoWebex avatar Mar 11 '19 12:03 GrupoWebex