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