Allow plugins to modify the obsolete files. (#6502)
Merge pull request 6502
This commit is contained in:
		
							parent
							
								
									cc89a838f5
								
							
						
					
					
						commit
						aa959cef8a
					
				| 
						 | 
				
			
			@ -24,7 +24,9 @@ module Jekyll
 | 
			
		|||
    #
 | 
			
		||||
    # Returns an Array of the file and directory paths
 | 
			
		||||
    def obsolete_files
 | 
			
		||||
      (existing_files - new_files - new_dirs + replaced_files).to_a
 | 
			
		||||
      out = (existing_files - new_files - new_dirs + replaced_files).to_a
 | 
			
		||||
      Jekyll::Hooks.trigger :clean, :on_obsolete, out
 | 
			
		||||
      out
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    # Private: The metadata file storing dependency tree and build history
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -39,6 +39,9 @@ module Jekyll
 | 
			
		|||
        :post_render => [],
 | 
			
		||||
        :post_write  => [],
 | 
			
		||||
      },
 | 
			
		||||
      :clean     => {
 | 
			
		||||
        :on_obsolete => [],
 | 
			
		||||
      },
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    # map of all hooks and their priorities
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue