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 +4 -4
- data/bin/opal-webpack-compile-server +18 -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: 254f61ad12a19a8d5712b94a2c8d00dd21c8d3840abed2481bf82f1fa86ff989
|
4
|
+
data.tar.gz: 5577b24f292caa635a9d71d607c38bbaab4f324870419b92840eb2756458f31d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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"
|
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.
|
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-
|
11
|
+
date: 2019-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|