isomorfeus-asset-manager 0.14.15 → 0.14.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isomorfeus/asset_manager/config.rb +12 -0
- data/lib/isomorfeus/asset_manager/version.rb +1 -1
- data/lib/isomorfeus/asset_manager.rb +20 -15
- 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: 7befddccb82a796903ddfebc8b93cfbff34b59358a33b80406b7a735a1d9e080
|
4
|
+
data.tar.gz: 8b27f42102ca6596338a15efc3f2c6c5779e92e4036b38b75b9aa8fe1aee7e49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 669c7fa2ec213c9b37f4f6f9a89a5efbc4a0992794ac7d039798aa84f944819b1b55d30e19fcbbfe1f2b0689f110a64f8f8122a2b3d4df099f9ed2093536bdee
|
7
|
+
data.tar.gz: b3dec9544fae51330b122b6f38687076bccace87c4bd7d0cd5c2f50e8ff260d46e58a704b9a38f03b65df4c2a54f76b0c213f56d058bd4dac4d0cc31087db6e2
|
@@ -61,6 +61,18 @@ module Isomorfeus
|
|
61
61
|
def test?
|
62
62
|
@test
|
63
63
|
end
|
64
|
+
|
65
|
+
def server_requires_reload?
|
66
|
+
@server_requires_reload
|
67
|
+
end
|
68
|
+
|
69
|
+
def server_reloaded!
|
70
|
+
@server_requires_reload = false
|
71
|
+
end
|
72
|
+
|
73
|
+
def server_requires_reload!
|
74
|
+
@server_requires_reload = true
|
75
|
+
end
|
64
76
|
end
|
65
77
|
end
|
66
78
|
|
@@ -125,22 +125,27 @@ module Isomorfeus
|
|
125
125
|
am_class = self.class
|
126
126
|
Isomorfeus.hmr_listener = Listen.to(*listen_dirs) do |modified, added, _|
|
127
127
|
(modified + added).each do |file|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
128
|
+
if file.start_with?(@server_path)
|
129
|
+
Isomorfeus.server_requires_reload!
|
130
|
+
else
|
131
|
+
begin
|
132
|
+
if file.end_with?('.rb')
|
133
|
+
Isomorfeus.server_requires_reload!
|
134
|
+
Isomorfeus.assets.each_value { |asset| asset.unbundle! }
|
135
|
+
update = compile_ruby(file)
|
136
|
+
update_json = Oj.dump(update, mode: :strict)
|
137
|
+
elsif file.end_with?('.yml') || file.end_with?('.mo') || file.end_with?('.po')
|
138
|
+
Isomorfeus.server_requires_reload!
|
139
|
+
update_json = Oj.dump({ locale: file }, mode: :strict)
|
140
|
+
else
|
141
|
+
update_json = Oj.dump({ error: "Don't know how to update #{file}!" }, mode: :strict)
|
142
|
+
end
|
143
|
+
Iodine.publish(Isomorfeus.asset_manager_hmr_channel, update_json)
|
144
|
+
rescue Exception => e
|
145
|
+
message = "Isomorfeus Asset Manager during hot module update:\n#{e.class}\n#{e.message}\n#{e.backtrace.join("\n")}"
|
146
|
+
STDERR.puts message
|
147
|
+
Iodine.publish(Isomorfeus.asset_manager_hmr_channel, Oj.dump({ error: message }, mode: :strict))
|
138
148
|
end
|
139
|
-
Iodine.publish(Isomorfeus.asset_manager_hmr_channel, update_json)
|
140
|
-
rescue Exception => e
|
141
|
-
message = "Isomorfeus Asset Manager during hot module update:\n#{e.class}\n#{e.message}\n#{e.backtrace.join("\n")}"
|
142
|
-
STDERR.puts message
|
143
|
-
Iodine.publish(Isomorfeus.asset_manager_hmr_channel, Oj.dump({ error: message }, mode: :strict))
|
144
149
|
end
|
145
150
|
end
|
146
151
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-asset-manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: brotli
|