opal-webpack-loader 0.8.1 → 0.8.2

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: d34a28b1df85de73b35742484b26da50a13481b07fc4bf96d65065a6adfd78e2
4
- data.tar.gz: eb7f6324947a11357451344607365b421b9bd6300d6e7410bab5efe51d0b8d0a
3
+ metadata.gz: 254f61ad12a19a8d5712b94a2c8d00dd21c8d3840abed2481bf82f1fa86ff989
4
+ data.tar.gz: 5577b24f292caa635a9d71d607c38bbaab4f324870419b92840eb2756458f31d
5
5
  SHA512:
6
- metadata.gz: 015572a3148732c34004bb96091a018b1ec9220473a042f72dcf79031206b857dc34c1b3ee6901d896a58b619883ce3fb9df96ac6e263136d4af91ce8be32fba
7
- data.tar.gz: 023053ba731cfcfff3b2f169a8146bd80589cb6586ca5b9af6976d63eecbda4406b1e1927d13d023455921dc238b47ad9b681f1bbdec3eccece64cfe8f78b4a4
6
+ metadata.gz: 2a8527341d06d9bc9b5860f82d7c7ca2115053fbf9bdc422150a7b619215fcaabd4fe0ce376713d904ba7269b94e3fedecc78d42be55f8dad9efd19aaf8371bd
7
+ data.tar.gz: 886419b70f9677e301464d7993f91f75596c8cafdca8aab85192d56c64a4f9f164a4c99e2ef202a53764c4f67909283c5a073b3e7d4c10e26690c67bd9b7180d
@@ -2,6 +2,7 @@
2
2
  require 'open3'
3
3
  require 'oj'
4
4
  require 'c_lexer'
5
+ require 'optparse'
5
6
  require 'opal/paths'
6
7
  require 'opal/source_map'
7
8
  require 'opal/compiler'
@@ -17,6 +18,22 @@ at_exit do
17
18
  end
18
19
  end
19
20
 
21
+ modules_to_require = []
22
+
23
+ OptionParser.new do |opts|
24
+ opts.on('-r', '--require MODULE', 'require the module before starting the compile server') do |m|
25
+ modules_to_require << m
26
+ end
27
+
28
+ opts.on('-I', '--include DIR', 'Append a load path (may be used more than once)') do |i|
29
+ $:.unshift(File.expand_path(i))
30
+ end
31
+ end.parse!
32
+
33
+ modules_to_require.each do |mod|
34
+ require mod
35
+ end
36
+
20
37
  if ARGV[0] == 'stop' || ARGV[0] == 'kill'
21
38
  OpalWebpackLoader::CompileServer.stop
22
39
  else
@@ -25,7 +42,7 @@ else
25
42
  number_of_workers = ARGV[1].to_i
26
43
  number_of_workers == 4 if number_of_workers == 0
27
44
  number_of_workers == 16 if number_of_workers > 16
28
- if ARGV[2]
45
+ if ARGV[2] && ARGV[2].start_with?('webpack')
29
46
  raise <<~MSG
30
47
  Please change the scripts in package.json to only start webpack:\n
31
48
  eg. from: "debug": "bundle exec opal-webpack-compile-server start 8 webpack --config=config/webpack/test.js"
@@ -1,3 +1,3 @@
1
1
  module OpalWebpackLoader
2
- VERSION="0.8.1"
2
+ VERSION="0.8.2"
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.8.1
4
+ version: 0.8.2
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-05-16 00:00:00.000000000 Z
11
+ date: 2019-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal