knockout-assets 0.0.6 → 0.0.7

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: 8b79568942bc8c6284247958f7254348fe075dde34e21dcc02f09f1836648f83
4
- data.tar.gz: fb08f41a2c513a26e464f4bc53324235e9745167db049e287e83fd8ca7a32d34
3
+ metadata.gz: 8a410e9f2cde1fb9ab6e9808463408759ca33a533ba35355694fbfad3c3aea6a
4
+ data.tar.gz: 233324792754ae2c652031de5e67da07971e0818d30c3bef9438688e5b68198f
5
5
  SHA512:
6
- metadata.gz: c3c9903a1398e1dc8a3316edbde20bda4c69e079a13af72f73aedb139b1a36daf0c936a914d8115167a1884f20a1435d98a83c68925f99abbfc48a3eda4ef328
7
- data.tar.gz: b52fe09197f98641911aa2d4c56a5a67dd39cbaea43c10a798b92348a09cc7d639cc523bd44af53f84b0aecf5d1a97ab47f0214e821398b5f08bfb20504f9fc7
6
+ metadata.gz: c38c99e730a40af063de1fe8566722a0ab694e68fb4916c493f428f62d8e20dc3e9a226d409af12f4907586e855c9c9e4f7f9260235d8dcc301bcc8ad52e8ea4
7
+ data.tar.gz: 207a5e7c36e6da1f52ca68de96b395ecbe6d076cfaed7bdc824a0a316d1385b8aed247e79bc0f150a04c4bb9fa917ebe29874a70fed9d7cddde37e084bb857ec
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## Version 0.0.7
2
+
3
+ Replace hidden `<img>` preload tags with `<link rel="preload" as="image">` for better performance and cleaner DOM.
4
+
1
5
  ## Version 0.0.6
2
6
 
3
7
  Add the ability to specify a nonce.
@@ -14,10 +14,10 @@
14
14
  };
15
15
  </script>
16
16
 
17
- <% # Write out all the images hidden. This preloads them so templates show instantly %>
17
+ <% # Preload images so templates show instantly when first rendered %>
18
18
  <% if preload
19
19
  asset_files.each { |k, v| %>
20
- <img src="<%= v %>" alt="<%= k %>" style="display: none;"/>
20
+ <link rel="preload" href="<%= v %>" as="image"/>
21
21
  <% }
22
22
  end
23
23
  %>
@@ -1,3 +1,3 @@
1
1
  module KnockoutAssets
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knockout-assets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Lascelles