opal-webpack-compile-server 0.1.8 → 0.1.9

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: 1f10204478ac16013896bb31b3265c4043375f6908c569528d1c6eaf4108e8a6
4
- data.tar.gz: 8f7329ae99710fc800cf433c2d021605b2022e0aa64476f5ec72b381e5e3c153
3
+ metadata.gz: 90d50c519ae87eb9be3cb808d37c85113c83b592b81949ceb04ad3b7ffbe1bf8
4
+ data.tar.gz: 2adfef5846d4cca307fd8edff8d4e7e55a5dca85b7dd9c586d790bdc029841dc
5
5
  SHA512:
6
- metadata.gz: 97e50430b4a2eb40611216dc89a1528154c08f6585add8c8bff501d3ddceec2c13b2e1931ad0e771b159589f78270f7794aa1eaa13d1587fcdd88aee34140939
7
- data.tar.gz: ab8700778bd6dc64b06073975a301047114296c29f7b5010dd04c170996acb5d1cf7bf0fbf429ce04aec2e374eedc3e0919affd2f33d2f2b30221a99d1344980
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.kill
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:kill')
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, es_six_imexable: true)
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.kill
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:kill\n", 0)
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
- # }
@@ -1,3 +1,3 @@
1
1
  module OpalWebpackCompileServer
2
- VERSION = '0.1.8'
2
+ VERSION = '0.1.9'
3
3
  end
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.8
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-06-18 00:00:00.000000000 Z
11
+ date: 2018-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine