Sha256: f7b811e6a2f346c1fd189b1840c664098783859720a01827c67b752e57263e1b
Contents?: true
Size: 690 Bytes
Versions: 4
Compression:
Stored size: 690 Bytes
Contents
require 'opal/sprockets' require_relative './app.rb' Opal.use_gem 'ovto' opal = Opal::Sprockets::Server.new {|s| s.append_path './ovto/' s.main = 'app' } sprockets = opal.sprockets prefix = '/assets' maps_prefix = '/__OPAL_SOURCE_MAPS__' maps_app = Opal::SourceMapServer.new(sprockets, maps_prefix) # Monkeypatch sourcemap header support into sprockets ::Opal::Sprockets::SourceMapHeaderPatch.inject!(maps_prefix) map maps_prefix do run maps_app end map prefix do run sprockets end run Sinatra.new(SinatraApp){ set :generate_javascript_include_tag, proc{ ::Opal::Sprockets.javascript_include_tag('app', sprockets: sprockets, prefix: prefix, debug: true) } }
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ovto-0.2.3 | example/sinatra/config.ru |
ovto-0.2.2 | example/sinatra/config.ru |
ovto-0.2.1 | example/sinatra/config.ru |
ovto-0.2.0 | example/sinatra/config.ru |