Class: Bridgetown::Commands::Clean
- Inherits:
-
Bridgetown::Command
- Object
- Samovar::Command
- Bridgetown::Command
- Bridgetown::Commands::Clean
- Includes:
- ConfigurationOverridable
- Defined in:
- bridgetown-core/lib/bridgetown-core/commands/clean.rb
Instance Method Summary collapse
Methods included from ConfigurationOverridable
#configuration_with_overrides, include_options
Methods inherited from Bridgetown::Command
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'bridgetown-core/lib/bridgetown-core/commands/clean.rb', line 14 def call config = configuration_with_overrides(, Bridgetown::Current.preloaded_configuration) destination = config["destination"] = 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(, checker_func: :file?) remove(cache_dir, checker_func: :directory?) remove(bundling_dir, checker_func: :directory?) end |