web_components_rails 2.2.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -2
- data/lib/web_components_rails/html_bundle_processor.rb +3 -3
- data/lib/web_components_rails/version.rb +1 -1
- data/lib/web_components_rails.rb +1 -1
- metadata +25 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2db958cf87cf1baa4da9ebb6d55e972fd50579b65f861257583938185dee190e
|
4
|
+
data.tar.gz: c4af64df3c8d06eb882d6b1a062ba3d4c54295b5c49c032b21d38ccadb1f4bde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f89768dd9ef1cf744f82b2ad16a852242b7db0ed275737a64b1b2f8ac57bc394fde8f3853205a287444a0ff433a4cb1ccfc35f56ffcd2e56aef9eeeec48687a3
|
7
|
+
data.tar.gz: 9390bd3db168d524d6d6a429ebc5347da18aed2f662079c8b2cbe01ada1128f4e25b8f3dedfb5ab01f338cd669f41de88b153c0f4490e6096ee927922578751c
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# web_components_rails
|
2
2
|
Ruby gem for using web components in Rails applications.
|
3
3
|
|
4
|
-
[![Build Status](https://travis-ci.org/uniite/web-components-rails.svg)](https://travis-ci.org/uniite/web-components-rails)
|
5
|
-
|
6
4
|
## Usage
|
7
5
|
1. Include the gem in your Gemfile:
|
8
6
|
```ruby
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'securerandom'
|
2
|
-
require '
|
2
|
+
require 'terser'
|
3
3
|
|
4
4
|
# Compresses HTML bundles
|
5
5
|
class WebComponentsRails::HTMLBundleProcessor
|
@@ -67,8 +67,8 @@ class WebComponentsRails::HTMLBundleProcessor
|
|
67
67
|
def optimized_script_tag(doc, raw_js)
|
68
68
|
combined_script_tag = Nokogiri::XML::Element.new('script', doc)
|
69
69
|
|
70
|
-
# Assume
|
71
|
-
minified_js =
|
70
|
+
# Assume terser is fine with defaults for minification
|
71
|
+
minified_js = Terser.compile(raw_js)
|
72
72
|
|
73
73
|
# Data-URI encode the JS (helps a lot in browsers like IE)
|
74
74
|
inlined_js = 'data:text/javascript;base64,'
|
data/lib/web_components_rails.rb
CHANGED
metadata
CHANGED
@@ -1,71 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web_components_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Botelho
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: nokogiri
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: '1.12'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '2.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
29
|
+
version: '1.12'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: rails
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - ">="
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
39
|
+
version: '6.0'
|
34
40
|
type: :runtime
|
35
41
|
prerelease: false
|
36
42
|
version_requirements: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
44
|
- - ">="
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
46
|
+
version: '6.0'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: sprockets-rails
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
51
|
- - ">="
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2
|
53
|
+
version: '3.2'
|
48
54
|
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
58
|
- - ">="
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2
|
60
|
+
version: '3.2'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
62
|
+
name: terser
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '1.1'
|
59
68
|
- - ">="
|
60
69
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
70
|
+
version: 1.1.1
|
62
71
|
type: :runtime
|
63
72
|
prerelease: false
|
64
73
|
version_requirements: !ruby/object:Gem::Requirement
|
65
74
|
requirements:
|
75
|
+
- - "~>"
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '1.1'
|
66
78
|
- - ">="
|
67
79
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
80
|
+
version: 1.1.1
|
69
81
|
- !ruby/object:Gem::Dependency
|
70
82
|
name: rspec
|
71
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -118,8 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
130
|
- !ruby/object:Gem::Version
|
119
131
|
version: '0'
|
120
132
|
requirements: []
|
121
|
-
|
122
|
-
rubygems_version: 2.7.4
|
133
|
+
rubygems_version: 3.4.10
|
123
134
|
signing_key:
|
124
135
|
specification_version: 4
|
125
136
|
summary: Web components utils for rails
|