Class: JsDependency::Cli
- Inherits:
-
Thor
- Object
- Thor
- JsDependency::Cli
- Defined in:
- lib/js_dependency/cli.rb
Instance Method Summary collapse
- #children ⇒ Object
- #export_markdown_report ⇒ Object
- #export_mermaid ⇒ Object
- #leave ⇒ Object
- #orphan ⇒ Object
- #parents ⇒ Object
- #version ⇒ Object
Instance Method Details
#children ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/js_dependency/cli.rb', line 67 def children args = JsDependency::CliUtils::Yaml.new(path: [:file_config]).args config = JsDependency::CliUtils::Config.new(, args) puts JsDependency.children( config.src_path, config.target_path, child_analyze_level: config.child_analyze_level, output_path: config.output_path, alias_paths: config.alias_paths, excludes: config.excludes ).join("\n") end |
#export_markdown_report ⇒ Object
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/js_dependency/cli.rb', line 125 def export_markdown_report args = JsDependency::CliUtils::Yaml.new(path: [:file_config]).args config = JsDependency::CliUtils::Config.new(, args) puts JsDependency.export_markdown_report( config.src_path, config.target_paths, child_analyze_level: config.child_analyze_level, parent_analyze_level: config.parent_analyze_level, alias_paths: config.alias_paths, name_level: config.name_level, excludes: config.excludes, identifier: config.identifier, exclude_output_names: config.exclude_output_names ) end |
#export_mermaid ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/js_dependency/cli.rb', line 21 def export_mermaid args = JsDependency::CliUtils::Yaml.new(path: [:file_config]).args config = JsDependency::CliUtils::Config.new(, args) puts JsDependency.export_mermaid( config.src_path, config.target_paths, child_analyze_level: config.child_analyze_level, parent_analyze_level: config.parent_analyze_level, output_path: config.output_path, alias_paths: config.alias_paths, name_level: config.name_level, excludes: config.excludes ) end |
#leave ⇒ Object
99 100 101 102 103 104 105 106 |
# File 'lib/js_dependency/cli.rb', line 99 def leave args = JsDependency::CliUtils::Yaml.new(path: [:file_config]).args config = JsDependency::CliUtils::Config.new(, args) puts JsDependency.leave( config.src_path, alias_paths: config.alias_paths ).join("\n") end |
#orphan ⇒ Object
85 86 87 88 89 90 91 92 |
# File 'lib/js_dependency/cli.rb', line 85 def orphan args = JsDependency::CliUtils::Yaml.new(path: [:file_config]).args config = JsDependency::CliUtils::Config.new(, args) puts JsDependency.orphan( config.src_path, alias_paths: config.alias_paths ).join("\n") end |
#parents ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/js_dependency/cli.rb', line 45 def parents args = JsDependency::CliUtils::Yaml.new(path: [:file_config]).args config = JsDependency::CliUtils::Config.new(, args) puts JsDependency.parents( config.src_path, config.target_path, parent_analyze_level: config.parent_analyze_level, output_path: config.output_path, alias_paths: config.alias_paths, excludes: config.excludes ).join("\n") end |
#version ⇒ Object
109 110 111 |
# File 'lib/js_dependency/cli.rb', line 109 def version puts JsDependency::VERSION end |