Class: Bridgetown::Commands::Webpack
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Bridgetown::Commands::Webpack
- Extended by:
- Summarizable
- Includes:
- Thor::Actions
- Defined in:
- lib/bridgetown-core/commands/webpack.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Summarizable
Class Method Details
.banner ⇒ Object
13 14 15 |
# File 'lib/bridgetown-core/commands/webpack.rb', line 13 def self. "bridgetown webpack ACTION" end |
.destination_root ⇒ Object
40 41 42 |
# File 'lib/bridgetown-core/commands/webpack.rb', line 40 def self.destination_root config.root_dir end |
.exit_on_failure? ⇒ Boolean
18 19 20 |
# File 'lib/bridgetown-core/commands/webpack.rb', line 18 def self.exit_on_failure? true end |
.source_root ⇒ Object
36 37 38 |
# File 'lib/bridgetown-core/commands/webpack.rb', line 36 def self.source_root File.("./webpack", __dir__) end |
Instance Method Details
#webpack ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/bridgetown-core/commands/webpack.rb', line 22 def webpack @logger = Bridgetown.logger return show_actions if args.empty? action = args.first if supported_actions.include?(action) perform action else @logger.error "Error:".red, "🚨 Please enter a valid action." say "\n" show_actions end end |