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 +4 -4
- data/lib/elm/compiler/version.rb +1 -1
- data/lib/elm/compiler.rb +3 -5
- 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: 0f23ecd935d96dd75433e1f54c93a6401ee18ecc6f6afb4693f55f489aaafc64
|
4
|
+
data.tar.gz: eccb9d81d4685e28283006f3a0c7b87518930f60b820ea8a8e3aeb06e0c3c634
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d85540f123294b557dba0d241fb585fad3a50d250f31a7eb8eeb13450337d25d23cb6f46ff1a21dbe1905258a4f23b201f03632e881a9f8b17e857f5a25b8a76
|
7
|
+
data.tar.gz: fd1b989aac484058ef6405c6028a1c057199fe601ceedaa4adaef42b767d6a4599cdc8b56bc30e7b89afa98e2605353380ddcb553d869edfa7f78876f67cf8f3
|
data/lib/elm/compiler/version.rb
CHANGED
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\)\)
|
51
|
-
contents.gsub!(/\(function\s*\(scope\)\s*\{
|
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!(
|
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.
|
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-
|
11
|
+
date: 2023-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|