Sha256: 46818691b5f4de9d726282466c0209ab2bb7264d7b23a4cf9d1837f939abf52c
Contents?: true
Size: 779 Bytes
Versions: 11
Compression:
Stored size: 779 Bytes
Contents
# Render the config/base/index.html when precompiling. Here we only render # one js and one css file. module Volt class BaseIndexRenderer def initialize(volt_app, manifest) @volt_app = volt_app @manifest = manifest end def html index_path = File.expand_path(File.join(Volt.root, 'config/base/index.html')) html = File.read(index_path) ERB.new(html, nil, '-').result(binding) end # When writing the index, we render the def javascript_tags "<script src=\"#{@volt_app.app_url}/#{@manifest['assets']['main/app.js']}\"></script>" end def css_tags "<link href=\"#{@volt_app.app_url}/#{@manifest['assets']['main/app.css']}\" media=\"all\" rel=\"stylesheet\" type=\"text/css\" />" end end end
Version data entries
11 entries across 11 versions & 1 rubygems