Module: ShopifyCLI::Commands

Defined in:
lib/shopify_cli/commands.rb,
lib/shopify_cli/commands/app.rb,
lib/shopify_cli/commands/help.rb,
lib/shopify_cli/commands/login.rb,
lib/shopify_cli/commands/store.rb,
lib/shopify_cli/commands/config.rb,
lib/shopify_cli/commands/logout.rb,
lib/shopify_cli/commands/switch.rb,
lib/shopify_cli/commands/system.rb,
lib/shopify_cli/commands/whoami.rb,
lib/shopify_cli/commands/version.rb,
lib/shopify_cli/commands/app/open.rb,
lib/shopify_cli/commands/populate.rb,
lib/shopify_cli/commands/app/serve.rb,
lib/shopify_cli/commands/reporting.rb,
lib/shopify_cli/commands/app/create.rb,
lib/shopify_cli/commands/app/deploy.rb,
lib/shopify_cli/commands/app/tunnel.rb,
lib/shopify_cli/commands/app/connect.rb,
lib/shopify_cli/commands/app/create/php.rb,
lib/shopify_cli/commands/app/create/node.rb,
lib/shopify_cli/commands/app/create/rails.rb,
lib/shopify_cli/commands/populate/product.rb,
lib/shopify_cli/commands/populate/customer.rb,
lib/shopify_cli/commands/populate/draft_order.rb

Defined Under Namespace

Classes: App, Config, Help, Login, Logout, Populate, Reporting, Store, Switch, System, Version, Whoami

Constant Summary collapse

Registry =
CLI::Kit::CommandRegistry.new(
  default: "help",
  contextual_resolver: nil,
)

Class Method Summary collapse

Class Method Details

.core_command?(cmd) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/shopify_cli/commands.rb', line 17

def self.core_command?(cmd)
  @core_commands.include?(cmd)
end

.register(const, cmd, path = nil, is_core = false) ⇒ Object



11
12
13
14
15
# File 'lib/shopify_cli/commands.rb', line 11

def self.register(const, cmd, path = nil, is_core = false)
  autoload(const, path) if path
  Registry.add(->() { const_get(const) }, cmd)
  @core_commands.push(cmd) if is_core
end