still trying to get the code working inside an engine (was fine in app)
This commit is contained in:
parent
b956f5709a
commit
53b549e921
@ -1 +1 @@
|
||||
//= link_directory ../javascript .js
|
||||
//= link_tree ../../javascript .js
|
||||
|
@ -1,2 +1,2 @@
|
||||
//= link_directory ../stylesheets/vue_r .css
|
||||
//= link_directory ../../javascript .js
|
||||
//= link_tree ../javascript .js
|
||||
|
8
app/assets/javascript/vue_r.rb
Normal file
8
app/assets/javascript/vue_r.rb
Normal file
@ -0,0 +1,8 @@
|
||||
require "opal"
|
||||
require "native"
|
||||
require 'promise'
|
||||
require 'browser/setup/mini'
|
||||
require 'opal-parser'
|
||||
|
||||
require "vue_r/application"
|
||||
require "vue_r/mounter"
|
@ -1,5 +1,3 @@
|
||||
require 'opal-parser'
|
||||
|
||||
module VueR
|
||||
class Mounter
|
||||
HANDLEBARS = /{{\s?([^}]*)\s?}}/
|
@ -1,2 +0,0 @@
|
||||
require "vue_r/application"
|
||||
require "vue_r/mounter"
|
@ -1,7 +1,13 @@
|
||||
require "opal-rails"
|
||||
require "opal-browser"
|
||||
|
||||
module VueR
|
||||
class Engine < ::Rails::Engine
|
||||
isolate_namespace VueR
|
||||
|
||||
initializer "vue_r.assets.precompile" do |app|
|
||||
app.config.assets.precompile += %w( vue_r.js )
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -7,6 +7,7 @@
|
||||
<%= csp_meta_tag %>
|
||||
|
||||
<%= stylesheet_link_tag "application" %>
|
||||
<%= javascript_include_tag "vue_r.js" %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -1,6 +1,7 @@
|
||||
require_relative "boot"
|
||||
|
||||
require "rails/all"
|
||||
require "vue_r/engine"
|
||||
|
||||
# Require the gems listed in Gemfile, including any gems
|
||||
# you've limited to :test, :development, or :production.
|
||||
|
Loading…
Reference in New Issue
Block a user