opal-webpack-loader 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/opal-webpack-loader/installer_cli.rb +3 -2
- data/lib/opal-webpack-loader/templates/application.js.erb +1 -1
- data/lib/opal-webpack-loader/templates/application_ssr.js.erb +1 -1
- data/lib/opal-webpack-loader/templates/initializer.rb.erb +3 -1
- data/lib/opal-webpack-loader/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4bf1d7b0296e9501cb443b54db1a4e9b39441811626a5bb41a155a759a997b9
|
4
|
+
data.tar.gz: 960c13472d5bf0e49149c8287444d1800643704bc5301b1ce41c4fd08042c0a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54cd86e6deaad0104c92ab01a3f456623c7e00fd115bb2ba8b440b053a3bc82da3b354cb3b475e6820668fa64d3c5b7887c25c4b5771e3b6cc9091c41a13bce4
|
7
|
+
data.tar.gz: 62b0b5297ad241cd87109577d956eafb0ab82f63457fa658842e3697eac3a8ed38dfcdc789c0df8f0c71a0dd749f532eac52032b7f849e360ec5689967230aac
|
@@ -80,7 +80,7 @@ module OpalWebpackLoader
|
|
80
80
|
create_directory(@styles_directory)
|
81
81
|
create_common_directories
|
82
82
|
install_common_things
|
83
|
-
create_file_from_template('initializer.rb.erb', 'owl_init.rb', {})
|
83
|
+
create_file_from_template('initializer.rb.erb', 'owl_init.rb', { opal_directory: @opal_directory })
|
84
84
|
add_gem
|
85
85
|
print_message
|
86
86
|
puts "Make sure to require the owl initializer, e.g. `require './owl_init'`, in your projects startup file."
|
@@ -123,7 +123,8 @@ module OpalWebpackLoader
|
|
123
123
|
create_directory(@styles_directory)
|
124
124
|
create_common_directories
|
125
125
|
install_common_things
|
126
|
-
create_file_from_template('initializer.rb.erb', File.join('config', 'initializers', 'opal_webpack_loader.rb'),
|
126
|
+
create_file_from_template('initializer.rb.erb', File.join('config', 'initializers', 'opal_webpack_loader.rb'),
|
127
|
+
{ opal_directory: @opal_directory })
|
127
128
|
add_gem
|
128
129
|
print_message
|
129
130
|
end
|
@@ -12,7 +12,7 @@
|
|
12
12
|
import './application_common.js';
|
13
13
|
|
14
14
|
// import and load opal ruby files
|
15
|
-
import init_app from '<%=
|
15
|
+
import init_app from '<%= opal_name %>_loader.rb';
|
16
16
|
init_app();
|
17
17
|
Opal.load('<%= opal_name %>_loader');
|
18
18
|
|
@@ -12,7 +12,7 @@
|
|
12
12
|
import './application_common.js';
|
13
13
|
|
14
14
|
// import and load opal ruby files
|
15
|
-
import init_app from '<%=
|
15
|
+
import init_app from '<%= opal_name %>_loader.rb';
|
16
16
|
init_app();
|
17
17
|
Opal.load('<%= opal_name %>_loader');
|
18
18
|
|
@@ -1,7 +1,9 @@
|
|
1
|
+
Opal.append_path(File.realdirpath(<%= opal_directory %>))
|
2
|
+
|
1
3
|
env = defined?(Rails) ? Rails.env : 'development'
|
2
4
|
|
3
5
|
if env != 'development'
|
4
|
-
OpalWebpackLoader.client_asset_path = '' # the full path is in the manifest already, like: /
|
6
|
+
OpalWebpackLoader.client_asset_path = '' # the full path is in the manifest already, like: /assets/application-97fd9c2b7e7bdb112fc1.js
|
5
7
|
OpalWebpackLoader.manifest_path = 'public/assets/manifest.json'
|
6
8
|
OpalWebpackLoader.use_manifest = true
|
7
9
|
else
|