Skip to content

Commit

Permalink
Merge pull request #1406 from mikesea/optional-dependencies
Browse files Browse the repository at this point in the history
Make haml/rbs dependencies optional
  • Loading branch information
kddnewton authored Nov 21, 2023
2 parents cd4a0dc + 34da38e commit 52418ab
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
require "json"
require "socket"

require "prettier_print"
require "syntax_tree"
require "syntax_tree/haml"
require "syntax_tree/rbs"

# Optional dependencies
%W[syntax_tree/rbs syntax_tree/haml prettier_print].each do |dep|
begin
require dep
rescue LoadError
end
end

# First, require all of the plugins that the user specified.
ARGV.shift[/^--plugins=(.*)$/, 1]
Expand Down

0 comments on commit 52418ab

Please sign in to comment.