require 'bundler/setup' Bundler.require desc "Build bundle" task :build do Opal.append_path "." build = Opal::Builder.build("application") File.binwrite "build/bundle.js", build.to_s << "\n//# sourceMappingURL=bundle.js.map" File.binwrite "build/bundle.js.map", build.source_map end