opal-webpack-compile-server 0.1.5 → 0.1.6

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: be5713b9c290d1aa74f2b66a054a0411387abd3d5b14b4f744c9a3b5b7c3b21d
4
- data.tar.gz: 4a5857b61dea72298dda54799325274b8e217bff95ac871de9adddf52d97c9b3
3
+ metadata.gz: 10fd27e526c9ac0b2c9a641fe12fd1e04227f3d851b7ce064c3b3cd983a8c880
4
+ data.tar.gz: 35be56f3ec585efcf142e620b3ee53d350bbf3585e90a40127db9e2b9aa8952a
5
5
  SHA512:
6
- metadata.gz: 48007a078ea64e865b4e148b0a3d973a1eaa67f2ff8a102f6c4f9721736fc5f96a91f714756eb241158f30d0eb097691e723b24a82318f7f682b882f58dc15d8
7
- data.tar.gz: 4047111cc3fb75f5317f1deb5ca4756637eda3a76c5f479ede465c5c444f87b7b815249850b654ba08e9be35d427021eb30811928b586786ca42d6c4df8c7455
6
+ metadata.gz: 2e489f9d23c8790ba2b059e05fdaaedc40fdb75c482ea291033912c68060945a084c5ab8134e3e06b24f73423281ace7c271d24e48d2285ebd85ef4015799da6
7
+ data.tar.gz: 265908c7a0404de21ecf0a0b9472b95238dd71ce66085f2000c79dfc9d3a71f1729a8df00b658430e97caf55d83e98ad7236bb6c3dae8a061738337592ea8acc
@@ -34,9 +34,10 @@ module OpalWebpackCompileServer
34
34
  c = Opal::Compiler.new(source, file: filename, es_six_imexable: true)
35
35
  c.compile
36
36
  result = { 'javascript' => c.result }
37
- result['source_map'] = c.source_map(filename).as_json
37
+ result['source_map'] = c.source_map.as_json
38
38
  result['source_map']['sourcesContent'] = [source]
39
39
  result['source_map']['file'] = filename
40
+ result['source_map']['names'] = result['source_map']['names'].map(&:to_s)
40
41
  result['required_trees'] = c.required_trees
41
42
  Oj.dump(result)
42
43
  rescue Exception => e
@@ -115,7 +116,6 @@ module OpalWebpackCompileServer
115
116
 
116
117
  def self.kill
117
118
  if File.exist?(OWCS_SOCKET_PATH)
118
- puts 'Killing Opal Webpack Compile Server'
119
119
  dont_unlink_on_exit
120
120
  s = UNIXSocket.new(OWCS_SOCKET_PATH)
121
121
  s.send("command:kill\n", 0)
@@ -134,7 +134,6 @@ module OpalWebpackCompileServer
134
134
  load_paths = OpalWebpackCompileServer::LoadPathManager.get_load_paths
135
135
  if load_paths
136
136
  Opal.append_paths(*load_paths)
137
- puts 'Starting Opal Webpack Compile Server'
138
137
  Process.daemon(true)
139
138
  EventMachine.run do
140
139
  EventMachine.start_unix_domain_server(OWCS_SOCKET_PATH, OpalWebpackCompileServer::Compiler)
@@ -1,3 +1,3 @@
1
1
  module OpalWebpackCompileServer
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
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.5
4
+ version: 0.1.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: 2018-06-01 00:00:00.000000000 Z
11
+ date: 2018-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine