Class: Brut::CLI::Apps::BuildAssets::All
Instance Attribute Summary
#parent_command
Instance Method Summary
collapse
#accepts, #args_description, #argv, #commands, #delegate_to_command, #detailed_description, #env, #env_vars, #name, #options, #opts, #puts, #run, #stdin, #system!, #theme
Constructor Details
#initialize ⇒ All
Returns a new instance of All.
48
49
50
51
52
53
54
|
# File 'lib/brut/cli/apps/build_assets.rb', line 48
def initialize
super([
Images.new,
Css.new,
Js.new,
])
end
|
Instance Method Details
#bootstrap? ⇒ Boolean
46
|
# File 'lib/brut/cli/apps/build_assets.rb', line 46
def bootstrap? = false
|
#default_rack_env ⇒ Object
44
|
# File 'lib/brut/cli/apps/build_assets.rb', line 44
def default_rack_env = "development"
|
#description ⇒ Object
45
|
# File 'lib/brut/cli/apps/build_assets.rb', line 45
def description = "Build all assets"
|
#execute(execution_context) ⇒ Object
56
57
58
59
60
61
62
63
|
# File 'lib/brut/cli/apps/build_assets.rb', line 56
def execute(execution_context)
if execution_context.options.clean?(default: execution_context.options.env != "production")
asset_metadata_file = Brut.container.asset_metadata_file
execution_context.stdout.puts "Removing #{asset_metadata_file}"
FileUtils.rm_f(asset_metadata_file)
end
super
end
|