Class: Bridgetown::Commands::Esbuild
- Inherits:
-
Bridgetown::Command
- Object
- Samovar::Command
- Bridgetown::Command
- Bridgetown::Commands::Esbuild
- Includes:
- Automations
- Defined in:
- bridgetown-core/lib/bridgetown-core/commands/esbuild.rb
Constant Summary
Constants included from Automations
Automations::CODEBERG_REGEX, Automations::CODEBERG_REPO_REGEX, Automations::CODEBERG_TREE_REGEX, Automations::GITHUB_BLOB_REGEX, Automations::GITHUB_REGEX, Automations::GITHUB_REPO_REGEX, Automations::GITHUB_TREE_REGEX, Automations::GITLAB_BLOB_REGEX, Automations::GITLAB_REGEX, Automations::GITLAB_REPO_REGEX, Automations::GITLAB_TREE_REGEX
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Automations
#add_gem, #add_initializer, #add_npm_for_gem, #add_npm_package, #apply_from_url, #create_builder, included, #javascript_import, #remove_npm_package, #ruby_configure
Methods inherited from Bridgetown::Command
Class Method Details
.exit_on_failure? ⇒ Boolean
12 13 14 |
# File 'bridgetown-core/lib/bridgetown-core/commands/esbuild.rb', line 12 def self.exit_on_failure? true end |
Instance Method Details
#call(new_site_dir: nil) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'bridgetown-core/lib/bridgetown-core/commands/esbuild.rb', line 16 def call(new_site_dir: nil) @logger = Bridgetown.logger return show_actions unless command self.source_paths = [File.("../commands/esbuild", __dir__)] self.destination_root = new_site_dir || config.root_dir if supported_actions.include?(command.to_sym) perform command else @logger.error "Error:".red, "🚨 Please enter a valid action." say "\n" show_actions end end |