opal-webpack-loader 0.9.5 → 0.9.6
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 +6 -19
- data/lib/opal-webpack-loader/templates/debug.js.erb +1 -1
- data/lib/opal-webpack-loader/templates/development.js.erb +1 -1
- data/lib/opal-webpack-loader/templates/production.js.erb +1 -1
- data/lib/opal-webpack-loader/templates/webpacker.js +1 -1
- data/lib/opal-webpack-loader/templates/webpacker_development.js_example +1 -1
- data/lib/opal-webpack-loader/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f95916c873eaec706c2a24dce187cb87e2d32243a0600afa5112264461531b3b
|
4
|
+
data.tar.gz: 7203b91ac09c9ac46ab0cff189e166d409427d73af29b0c23a985e20e5ed071d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73f0f7056c49a5b3d8fc6a2d8029ffce3eac0b09c45194d1226242d9a8a21d6d863dfd030267740f8f72a42c5d12d1e1377396cbaac1f5dbc9417220465b4587
|
7
|
+
data.tar.gz: 05a42327e501e92998224d615410f79f44ffc3c08d4ad110a8dc729abab593793386de216097e1114d2b85f13516e1e0e04efdecaac6453778aae4ba33efd019
|
@@ -47,7 +47,6 @@ module OpalWebpackLoader
|
|
47
47
|
create_directory(@asset_output_directory)
|
48
48
|
FileUtils.touch(File.join(@asset_output_directory, '.keep'))
|
49
49
|
install_webpack_config
|
50
|
-
install_gitignore
|
51
50
|
create_file_from_template('initializer.rb.erb', File.join('owl_init.rb'), { opal_load_path: '' })
|
52
51
|
# add_gem
|
53
52
|
end
|
@@ -69,7 +68,7 @@ module OpalWebpackLoader
|
|
69
68
|
#
|
70
69
|
# TEXT
|
71
70
|
option :opal_name, required: false, type: :string, default: 'opal', aliases: '-o', desc: <<~TEXT
|
72
|
-
Set directory name for Opal source files.
|
71
|
+
Set directory name for Opal source files.
|
73
72
|
Example: owl-installer rails -o isomorfeus # will use project_root/app/isomorfeus for opal files
|
74
73
|
TEXT
|
75
74
|
|
@@ -115,7 +114,7 @@ module OpalWebpackLoader
|
|
115
114
|
#
|
116
115
|
# TEXT
|
117
116
|
option :opal_name, required: false, type: :string, default: 'opal', aliases: '-o', desc: <<~TEXT
|
118
|
-
Set directory name for Opal source files.
|
117
|
+
Set directory name for Opal source files.
|
119
118
|
Example: owl-installer rails -o isomorfeus # will use project_root/app/isomorfeus for opal files
|
120
119
|
TEXT
|
121
120
|
|
@@ -161,7 +160,7 @@ module OpalWebpackLoader
|
|
161
160
|
#
|
162
161
|
# TEXT
|
163
162
|
option :opal_name, required: false, type: :string, default: 'opal', aliases: '-o', desc: <<~TEXT
|
164
|
-
Set directory name for Opal source files.
|
163
|
+
Set directory name for Opal source files.
|
165
164
|
Example: owl-installer rails -o isomorfeus # will use project_root/app/isomorfeus for opal files
|
166
165
|
TEXT
|
167
166
|
|
@@ -183,7 +182,6 @@ module OpalWebpackLoader
|
|
183
182
|
install_webpacker_package_json
|
184
183
|
install_webpacker_js_entry
|
185
184
|
install_opal_entries
|
186
|
-
install_gitignore
|
187
185
|
create_file_from_template('initializer.rb.erb', File.join('config', 'initializers', 'opal_webpack_loader.rb'),
|
188
186
|
{ opal_load_path: "Opal.append_path(File.realdirpath('#{@opal_directory}'))" })
|
189
187
|
add_gem
|
@@ -214,17 +212,6 @@ module OpalWebpackLoader
|
|
214
212
|
install_js_entries
|
215
213
|
install_opal_entries
|
216
214
|
install_procfile
|
217
|
-
install_gitignore
|
218
|
-
end
|
219
|
-
|
220
|
-
def install_gitignore
|
221
|
-
if File.exist?('.gitignore')
|
222
|
-
gitignore = File.read('.gitignore', more: 'r')
|
223
|
-
unless gitignore.include?('.owl_cache')
|
224
|
-
gitignore << "\n.owl_cache\n"
|
225
|
-
File.write('.gitignore', gitignore)
|
226
|
-
end
|
227
|
-
end
|
228
215
|
end
|
229
216
|
|
230
217
|
def install_js_entries
|
@@ -354,7 +341,7 @@ module OpalWebpackLoader
|
|
354
341
|
def install_webpacker_js_entry
|
355
342
|
application_js = File.read(File.join('app', 'javascript', 'packs', 'application.js'), mode: 'r')
|
356
343
|
application_js << <<~JAVASCRIPT
|
357
|
-
|
344
|
+
|
358
345
|
// import and load opal ruby files
|
359
346
|
import init_app from '#{options[:opal_name]}_loader.rb';
|
360
347
|
init_app();
|
@@ -397,7 +384,7 @@ module OpalWebpackLoader
|
|
397
384
|
|
398
385
|
def print_message
|
399
386
|
puts <<~TEXT
|
400
|
-
|
387
|
+
|
401
388
|
Add the following lines to your Gemfile:
|
402
389
|
|
403
390
|
gem 'opal', github: 'janbiedermann/opal', branch: 'es6_modules_1_1'
|
@@ -414,7 +401,7 @@ module OpalWebpackLoader
|
|
414
401
|
or:
|
415
402
|
|
416
403
|
npm install
|
417
|
-
|
404
|
+
|
418
405
|
and then:
|
419
406
|
|
420
407
|
bundle install
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opal-webpack-loader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|