elm-compiler 0.5.0 → 0.5.1

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: 28756a5b0cde783ca8b032103fe8c49fe31002f4c9a5cfa1b8f2645b867f63d7
4
- data.tar.gz: 16cdc3ab15baa7995c9d2446cadbc4d1e37f744749c763b57c584b3b58cceb29
3
+ metadata.gz: 0f23ecd935d96dd75433e1f54c93a6401ee18ecc6f6afb4693f55f489aaafc64
4
+ data.tar.gz: eccb9d81d4685e28283006f3a0c7b87518930f60b820ea8a8e3aeb06e0c3c634
5
5
  SHA512:
6
- metadata.gz: 966a4f9d92b274ba0dd678deb558174852d35c5050a6a4d49e85fdb86b28fcf382324533a3721b6067737885f0ba9114a45d7481428d0a226c75c199fe3adf1e
7
- data.tar.gz: ead2697e36189e12694db5c227c69c72401b8987ab7793a2a7047e03edb2d360a74a0670cb2e6e031b5f388371101816e7e4fdb9f1c9a61b477a602a4436ebc7
6
+ metadata.gz: d85540f123294b557dba0d241fb585fad3a50d250f31a7eb8eeb13450337d25d23cb6f46ff1a21dbe1905258a4f23b201f03632e881a9f8b17e857f5a25b8a76
7
+ data.tar.gz: fd1b989aac484058ef6405c6028a1c057199fe601ceedaa4adaef42b767d6a4599cdc8b56bc30e7b89afa98e2605353380ddcb553d869edfa7f78876f67cf8f3
@@ -1,5 +1,5 @@
1
1
  module Elm
2
2
  class Compiler
3
- VERSION = '0.5.0'
3
+ VERSION = '0.5.1'
4
4
  end
5
5
  end
data/lib/elm/compiler.rb CHANGED
@@ -47,12 +47,10 @@ module Elm
47
47
 
48
48
  def convert_file_to_esm!(path)
49
49
  contents = File.read(path)
50
- exports = contents[/^\s*_Platform_export\((.*)\)\;\n?\}\(this\)\)\;/, 1]
51
- contents.gsub!(/\(function\s*\(scope\)\s*\{$/, '// -- \1')
50
+ exports = contents[/^\s*_Platform_export\((.*)\)\;\n?\}\(this\)\)\;/m, 1]
51
+ contents.gsub!(/\(function\s*\(scope\)\s*\{$/m, '// -- \1')
52
52
  contents.gsub!(/['"]use strict['"];$/, '// -- \1')
53
- contents.gsub!(/function _Platform_export(.*?)\}\n/, '/*\n\1\n*/')
54
- contents.gsub!(/function _Platform_mergeExports(.*?)\}\n\s*}/, '/*\n\1\n*/')
55
- contents.gsub!(/^\s*_Platform_export\((.*)\)\;\n?}\(this\)\)\;/, '/*\n\1\n*/')
53
+ contents.gsub!(/^\s*_Platform_export\((.*)\)\;\n?\}\(this\)\)\;/m, '/*\n\1\n*/')
56
54
  contents << "\nexport default #{exports};"
57
55
  File.write(path, contents)
58
56
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elm-compiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Bonetti
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-25 00:00:00.000000000 Z
11
+ date: 2023-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec