Skip to content

Commit

Permalink
fixup! Use buidler instead of raw require parser for CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
elia committed Oct 9, 2013
1 parent abd64e8 commit 68f06d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/opal/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ def run_code
requires.each do |path|
path = Pathname(path)
path = Pathname(path_finder.find(path)) unless path.absolute?
full_source << builder.build(path)
full_source << builder.build_str(path.read, :file => path.to_s)
end

evals.each_with_index do |code, index|
full_source << Opal::RequireParser.parse(code, :file => "(eval #{index+1})")
full_source << builder.build_str(code, :file => "(eval #{index+1})")
end

file = Pathname(filename.to_s)
full_source << Opal::RequireParser.parse(file.read, :file => file) if file.exist?
full_source << builder.build_str(file.read, :file => file.to_s) if file.exist?

run_with_node(full_source)
end
Expand Down

0 comments on commit 68f06d1

Please sign in to comment.