Sha256: 5ddbcf79ad9038dc288cd1769eb406bc70acd76fc87fb6c1cc54679c3d086a15
Contents?: true
Size: 471 Bytes
Versions: 6
Compression:
Stored size: 471 Bytes
Contents
# frozen_string_literal: true require 'opal/paths' # The compiler runner will just output the compiled JavaScript Opal::CliRunners::Compiler = ->(data) { options = data[:options] || {} builder = data.fetch(:builder) map_file = options[:map_file] output = data.fetch(:output) compiled_source = builder.to_s + "\n" + builder.source_map.to_data_uri_comment output.puts compiled_source File.write(map_file, builder.source_map.to_json) if map_file 0 }
Version data entries
6 entries across 6 versions & 1 rubygems