Sha256: 48fc9af4c770ea383ceef8f8b4954527f42f88254d791ac654c0e2fa284348da
Contents?: true
Size: 617 Bytes
Versions: 4
Compression:
Stored size: 617 Bytes
Contents
class Opal::InstallGenerator < Rails::Generators::Base source_root File.expand_path('templates', __dir__) def configure_sprockets append_to_file 'app/assets/config/manifest.js', '//= link_directory ../javascript .js' template "application.js.rb", "app/assets/javascript/application.js.rb" template "initializer.rb", "config/initializers/opal.rb" # Add the javascript tag to the application head tag gsub_file 'app/views/layouts/application.html.erb', %r{(\n *)</head>}, '\1 <%= javascript_include_tag "application", "data-turbolinks-track": "reload" %>' \ '\1</head>' end end
Version data entries
4 entries across 4 versions & 1 rubygems