Class: YkIosCmd::CLI

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/yk_command/commands.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/yk_command/commands.rb', line 13

def self.exit_on_failure?
  true
end

Instance Method Details

#component_repo_push(path = nil) ⇒ Object



97
98
99
# File 'lib/yk_command/commands.rb', line 97

def component_repo_push(path = nil)
  ComponentPublish.new.publish_component(path)
end

#component_version_report(path = nil) ⇒ Object



104
105
106
# File 'lib/yk_command/commands.rb', line 104

def component_version_report(path = nil)
  ComponentPublish.new.post_version_deperated_data(path)
end

#create_component_with_demo(path = nil) ⇒ Object



31
32
33
# File 'lib/yk_command/commands.rb', line 31

def create_component_with_demo(path = nil)
  YkModule.new(args, options).create(path, false)
end

#create_component_with_simple_demo(path = nil) ⇒ Object



37
38
39
# File 'lib/yk_command/commands.rb', line 37

def create_component_with_simple_demo(path = nil)
  YkModule.new(args, options).create(path, true)
end

#create_host_app(path = nil) ⇒ Object



43
44
45
46
47
48
# File 'lib/yk_command/commands.rb', line 43

def create_host_app(path = nil)
  puts ' -- '
  # TODO: 实现创建一个host app项目,分为纯净版本,类似于Xcode的初始项目,和包含基础组件和热门组件用于生产目的的项目
  #
  YkProject.new(true).create_host('TestApp', 'swift', 'YK', 'Tom', path)
end

#dependency(path = nil) ⇒ Object



55
56
57
# File 'lib/yk_command/commands.rb', line 55

def dependency(path = nil)
  Analyzer.new(path).dependency path
end

#generate(path = nil, name, lang, class_prefix, author) ⇒ Object



25
26
27
# File 'lib/yk_command/commands.rb', line 25

def generate(path = nil, name, lang, class_prefix, author)
  YkModule.new(args, options).generate(path, name, lang, class_prefix, author)
end

#platform_create_component(name, desc) ⇒ Object



81
82
83
84
# File 'lib/yk_command/commands.rb', line 81

def platform_create_component(name, desc)
  p = ComponentManagePlatform.new
  p.create_new_component(name, desc)
end

#platform_delete_component(name) ⇒ Object



89
90
91
92
# File 'lib/yk_command/commands.rb', line 89

def platform_delete_component(name)
  p = ComponentManagePlatform.new
  p.delete_component(name)
end

#platform_refreshObject



71
72
73
74
75
76
# File 'lib/yk_command/commands.rb', line 71

def platform_refresh
  p = ComponentManagePlatform.new
  p.update_app_data
  p.update_component_data
  p.update_third_lib_data
end

#workspace_analyze(path = nil) ⇒ Object



63
64
65
# File 'lib/yk_command/commands.rb', line 63

def workspace_analyze(path = nil)
  Analyzer.new(path).workspace_analyze path
end