File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 66
77require "syntax_tree"
88
9+ # Optional dependencies
10+ %W[
11+ syntax_tree/rbs
12+ syntax_tree/haml
13+ prettier_print
14+ ] . each do |dep |
15+ begin
16+ require dep
17+ rescue LoadError
18+ end
19+ end
20+
921# First, require all of the plugins that the user specified.
1022ARGV . shift [ /^--plugins=(.*)$/ , 1 ]
1123 . split ( "," )
97109 formatter . flush
98110 formatter . output . join
99111 when "rbs"
100- require "syntax_tree/rbs"
101112 formatter =
102113 SyntaxTree ::RBS ::Formatter . new (
103114 source ,
110121 formatter . flush
111122 formatter . output . join
112123 when "haml"
113- require "syntax_tree/haml"
114- require "prettier_print"
115124 formatter =
116125 if defined? ( SyntaxTree ::Haml ::Format ::Formatter )
117126 SyntaxTree ::Haml ::Format ::Formatter . new (
You can’t perform that action at this time.
0 commit comments