Class: Bridgetown::Commands::Clean
  
  
  
  
    
      Class Method Summary
      collapse
    
    
  
    
      Instance Method Summary
      collapse
    
    
  
  
  
  
  
  
  
  
  
  
  extended
  
  
  
  
  
  
  
  
  
  summary
  
  
  
  
  
  
  
  
  
  #configuration_with_overrides, included
  
  
    Class Method Details
    
      
  
  
    .banner  ⇒ Object 
  
  
  
  
    
      
14
15
16 
     | 
    
      # File 'bridgetown-core/lib/bridgetown-core/commands/clean.rb', line 14
def self.banner
  "bridgetown clean [options]"
end 
     | 
  
 
    
   
  
    Instance Method Details
    
      
  
  
    #clean  ⇒ Object 
  
  
  
  
    
      
19
20
21
22
23
24
25
26
27
28
29
30 
     | 
    
      # File 'bridgetown-core/lib/bridgetown-core/commands/clean.rb', line 19
def clean
  config = configuration_with_overrides(options, Bridgetown::Current.preloaded_configuration)
  destination = config["destination"]
  metadata_file = File.join(config["root_dir"], ".bridgetown-metadata")
  cache_dir = File.join(config["root_dir"], config["cache_dir"])
  bundling_dir = File.join(config["root_dir"], ".bridgetown-cache", "frontend-bundling")
  remove(destination, checker_func: :directory?)
  remove(metadata_file, checker_func: :file?)
  remove(cache_dir, checker_func: :directory?)
  remove(bundling_dir, checker_func: :directory?)
end 
     |