opal-webpack-compile-server 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90d50c519ae87eb9be3cb808d37c85113c83b592b81949ceb04ad3b7ffbe1bf8
|
4
|
+
data.tar.gz: 2adfef5846d4cca307fd8edff8d4e7e55a5dca85b7dd9c586d790bdc029841dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61ff630ee350f4df52cf38cc94978375b2a708f6d9136084bc8f5cc2b3652baeeddcc105164bad86e2e8e1fa24ea5cda0e9ada7dc1c95e54493bf46edd7fa2b6
|
7
|
+
data.tar.gz: 70a9c9e23a43a6ea64192f5d26adb170270942db56c03cadf5e270011c7f0dcf4b2996bafa4321d4671a2cf922426397843ffc4ffe71b0ab777fbd477d7c16c5
|
@@ -2,8 +2,8 @@
|
|
2
2
|
require 'opal-webpack-compile-server/exe'
|
3
3
|
require 'opal-webpack-compile-server/version'
|
4
4
|
|
5
|
-
if ARGV[0] == 'kill'
|
6
|
-
OpalWebpackCompileServer::Exe.
|
5
|
+
if ARGV[0] == 'stop' || ARGV[0] == 'kill'
|
6
|
+
OpalWebpackCompileServer::Exe.stop
|
7
7
|
else
|
8
8
|
OpalWebpackCompileServer::Exe.run
|
9
9
|
end
|
@@ -21,7 +21,7 @@ module OpalWebpackCompileServer
|
|
21
21
|
|
22
22
|
class Compiler < EventMachine::Connection
|
23
23
|
def receive_data(data)
|
24
|
-
if data.start_with?('command:
|
24
|
+
if data.start_with?('command:stop')
|
25
25
|
EventMachine.stop
|
26
26
|
exit(0)
|
27
27
|
end
|
@@ -31,7 +31,7 @@ module OpalWebpackCompileServer
|
|
31
31
|
operation = proc do
|
32
32
|
begin
|
33
33
|
source = File.read(filename)
|
34
|
-
c = Opal::Compiler.new(source, file: filename,
|
34
|
+
c = Opal::Compiler.new(source, file: filename, es6_modules: true)
|
35
35
|
c.compile
|
36
36
|
result = { 'javascript' => c.result }
|
37
37
|
result['source_map'] = c.source_map.as_json
|
@@ -120,12 +120,12 @@ module OpalWebpackCompileServer
|
|
120
120
|
@unlink = false
|
121
121
|
end
|
122
122
|
|
123
|
-
def self.
|
123
|
+
def self.stop
|
124
124
|
if File.exist?(OWCS_SOCKET_PATH)
|
125
125
|
dont_unlink_on_exit
|
126
126
|
begin
|
127
127
|
s = UNIXSocket.new(OWCS_SOCKET_PATH)
|
128
|
-
s.send("command:
|
128
|
+
s.send("command:stop\n", 0)
|
129
129
|
s.close
|
130
130
|
rescue
|
131
131
|
# socket cant be reached so owcs is already dead, delete socket
|
@@ -154,36 +154,3 @@ module OpalWebpackCompileServer
|
|
154
154
|
end
|
155
155
|
end
|
156
156
|
end
|
157
|
-
|
158
|
-
# js
|
159
|
-
#
|
160
|
-
# get_load_paths() {
|
161
|
-
# var load_paths;
|
162
|
-
# if (fs.existsSync('bin/rails')) {
|
163
|
-
# load_paths = child_process.execSync('bundle exec rails runner ' +
|
164
|
-
# '"puts (Rails.configuration.respond_to?(:assets) ? ' +
|
165
|
-
# '(Rails.configuration.assets.paths + Opal.paths).uniq : ' +
|
166
|
-
# 'Opal.paths); exit 0"');
|
167
|
-
# } else {
|
168
|
-
# load_paths = child_process.execSync('bundle exec ruby -e "Bundler.require; puts Opal.paths; exit 0"');
|
169
|
-
# }
|
170
|
-
# var load_path_lines = load_paths.toString().split('\n');
|
171
|
-
# var lp_length = load_path_lines.length;
|
172
|
-
# if (load_path_lines[lp_length-1] === '' || load_path_lines[lp_length-1] == null) {
|
173
|
-
# load_path_lines.pop();
|
174
|
-
# }
|
175
|
-
# return load_path_lines;
|
176
|
-
# }
|
177
|
-
#
|
178
|
-
# get_load_path_entries(load_paths) {
|
179
|
-
# var load_path_entries = [];
|
180
|
-
# var lp_length = load_paths.length;
|
181
|
-
# for (var i = 0; i < lp_length; i++) {
|
182
|
-
# var dir_entries = this.get_directory_entries(load_paths[i], false);
|
183
|
-
# var d_length = dir_entries.length;
|
184
|
-
# for (var k = 0; k < d_length; k++) {
|
185
|
-
# load_path_entries.push(dir_entries[k]);
|
186
|
-
# }
|
187
|
-
# }
|
188
|
-
# return load_path_entries;
|
189
|
-
# }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opal-webpack-compile-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eventmachine
|