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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd6dae21b9d2250681bc8a84e23e8a8e94b493a1f8fd84455ce7b691319fe17e
4
- data.tar.gz: 9a2a449ff6be7b74787feb2fa265afd4c764ad6d451bd0f17021424378626070
3
+ metadata.gz: f95916c873eaec706c2a24dce187cb87e2d32243a0600afa5112264461531b3b
4
+ data.tar.gz: 7203b91ac09c9ac46ab0cff189e166d409427d73af29b0c23a985e20e5ed071d
5
5
  SHA512:
6
- metadata.gz: 8d5c7502b18a67ad27b90f26be944ee5dd2f1c26f6593bdcc2e1c54aa70514c40f715ab42e3fc1313ced45cce4fe351e01151c8bf06d7c7fa5b8c8d725d3c0b6
7
- data.tar.gz: 53ad167a9b51371e3c99ae80a245e620e5156f30ac35d5176e8cb54398376fc0e8be2d44e56070f57bf9ae8f0e5ff8c61158d811f595a0c82352009b0ed16646
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
@@ -84,7 +84,7 @@ const common_config = {
84
84
  },
85
85
  {
86
86
  // opal-webpack-loader will compile and include ruby files in the pack
87
- test: /.(rb|js.rb)$/,
87
+ test: /(\.js)?\.rb$/,
88
88
  use: [
89
89
  { loader: "cache-loader" },
90
90
  {
@@ -66,7 +66,7 @@ const common_config = {
66
66
  },
67
67
  {
68
68
  // opal-webpack-loader will compile and include ruby files in the pack
69
- test: /.(rb|js.rb)$/,
69
+ test: /(\.js)?\.rb$/,
70
70
  use: [
71
71
  { loader: "cache-loader" },
72
72
  {
@@ -63,7 +63,7 @@ const common_config = {
63
63
  },
64
64
  {
65
65
  // opal-webpack-loader will compile and include ruby files in the pack
66
- test: /.(rb|js.rb)$/,
66
+ test: /(\.js)?\.rb$/,
67
67
  use: [
68
68
  { loader: "cache-loader" },
69
69
  {
@@ -13,7 +13,7 @@ environment.config.merge(owl_resolver);
13
13
 
14
14
  const opal_loader = {
15
15
  // opal-webpack-loader will compile and include ruby files in the pack
16
- test: /.(rb|js.rb)$/,
16
+ test: /(\.js)?\.rb$/,
17
17
  use: [
18
18
  {
19
19
  loader: 'opal-webpack-loader',
@@ -4,7 +4,7 @@ const chokidar = require('chokidar');
4
4
  const OwlResolver = require('opal-webpack-loader/resolver');
5
5
 
6
6
  const owl = {
7
- test: /.(rb|js.rb)$/,
7
+ test: /(\.js)?\.rb$/,
8
8
  use: [
9
9
  {
10
10
  loader: 'opal-webpack-loader',
@@ -1,3 +1,3 @@
1
1
  module OpalWebpackLoader
2
- VERSION="0.9.5"
2
+ VERSION="0.9.6"
3
3
  end
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.5
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-08-21 00:00:00.000000000 Z
11
+ date: 2019-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal