Class: YkCommand::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)


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

def self.exit_on_failure?
  true
end

Instance Method Details

#component_repo_push(path = nil) ⇒ Object



102
103
104
# File 'lib/yk_command/commands.rb', line 102

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

#component_version_report(path = nil) ⇒ Object



109
110
111
# File 'lib/yk_command/commands.rb', line 109

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

#create_component_with_demo(path = nil) ⇒ Object



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

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

#create_component_with_simple_demo(path = nil) ⇒ Object



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

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

#create_host_app(path = nil) ⇒ Object



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

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



57
58
59
# File 'lib/yk_command/commands.rb', line 57

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

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



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

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



84
85
86
87
88
# File 'lib/yk_command/commands.rb', line 84

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

end

#platform_delete_component(name) ⇒ Object



93
94
95
96
97
# File 'lib/yk_command/commands.rb', line 93

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

end

#platform_refreshObject



73
74
75
76
77
78
79
# File 'lib/yk_command/commands.rb', line 73

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



65
66
67
# File 'lib/yk_command/commands.rb', line 65

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