autoprefixer-rails 10.4.13.0 → 10.4.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/autoprefixer-rails/processor.rb +39 -35
- data/lib/autoprefixer-rails/result.rb +2 -2
- data/lib/autoprefixer-rails/sprockets.rb +6 -6
- data/lib/autoprefixer-rails/version.rb +1 -1
- data/lib/autoprefixer-rails.rb +3 -3
- data/lib/rake/autoprefixer_tasks.rb +1 -1
- data/vendor/autoprefixer.js +2799 -3431
- 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: 8e3706e830d83f7a9c0d05c8a489abca67b7d2ee688c8570a10a8f4a2f6ca57e
|
4
|
+
data.tar.gz: 3b85610b1238b10825f1e8d942c09d9d2b91f93c512a482f32e4e49018af47e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46af2ba9144e6d018d6eaeffe1e689be827ed05d9ec48d6008a54bc2e5e1a97f47bae5ec35c177526085a4ff447740d26921a56c751be00d3fb903d7081b4c3f
|
7
|
+
data.tar.gz: feb0ddb7d4a293c504daf67c56e2ad1fd7478f6099c8ea673b7604f20e2a747f8a46902d84fcbc979974dfde15e8e1f634b7399076ef24f3e980aa09706c59b6
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 10.4.15.0
|
4
|
+
* Improved startup time and reduced JS bundle size (by Kārlis Gaņģis).
|
5
|
+
* Fixed `::backdrop` prefixes (by 一丝).
|
6
|
+
|
3
7
|
## 10.4.13.0
|
4
8
|
* Fixed missed prefixes on vendor prefixes in name of CSS Custom Property.
|
5
9
|
* Fixed support of unit-less zero angle in backgrounds (by 一丝).
|
@@ -55,14 +55,14 @@ module AutoprefixerRails
|
|
55
55
|
|
56
56
|
# Parse Browserslist config
|
57
57
|
def parse_config(config)
|
58
|
-
sections = {
|
59
|
-
current
|
58
|
+
sections = {"defaults" => []}
|
59
|
+
current = "defaults"
|
60
60
|
config.gsub(/#[^\n]*/, "")
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
if IS_SECTION
|
61
|
+
.split(/\n/)
|
62
|
+
.map(&:strip)
|
63
|
+
.reject(&:empty?)
|
64
|
+
.each do |line|
|
65
|
+
if IS_SECTION.match?(line)
|
66
66
|
current = line.match(IS_SECTION)[1].strip
|
67
67
|
sections[current] ||= []
|
68
68
|
else
|
@@ -76,16 +76,16 @@ module AutoprefixerRails
|
|
76
76
|
|
77
77
|
def params_with_browsers(from = nil)
|
78
78
|
from ||= if defined?(Rails) && Rails.respond_to?(:root) && Rails.root
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
79
|
+
Rails.root.join("app/assets/stylesheets").to_s
|
80
|
+
else
|
81
|
+
"."
|
82
|
+
end
|
83
83
|
|
84
84
|
params = @params
|
85
85
|
if !params.key?(:browsers) && !params.key?(:overrideBrowserslist) && from
|
86
86
|
file = find_config(from)
|
87
87
|
if file
|
88
|
-
env
|
88
|
+
env = params[:env].to_s || "development"
|
89
89
|
config = parse_config(file)
|
90
90
|
params = params.dup
|
91
91
|
params[:overrideBrowserslist] = (config[env] || config["defaults"])
|
@@ -100,7 +100,7 @@ module AutoprefixerRails
|
|
100
100
|
converted = {}
|
101
101
|
|
102
102
|
opts.each_pair do |name, value|
|
103
|
-
if /_
|
103
|
+
if /_/.match?(name)
|
104
104
|
name = name.to_s.gsub(/_\w/) { |i| i.delete("_").upcase }.to_sym
|
105
105
|
end
|
106
106
|
value = convert_options(value) if value.is_a? Hash
|
@@ -131,28 +131,32 @@ module AutoprefixerRails
|
|
131
131
|
def runtime
|
132
132
|
@runtime ||= begin
|
133
133
|
ExecJS.compile(build_js)
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
134
|
+
rescue ExecJS::RuntimeError
|
135
|
+
# Only complain about unsupported runtimes when it failed to parse our script.
|
136
|
+
|
137
|
+
case ExecJS.runtime
|
138
|
+
when ExecJS::Runtimes::Node
|
139
|
+
node_command = begin
|
140
|
+
ExecJS.runtime.send(:binary)
|
141
|
+
rescue
|
142
|
+
"Unknown"
|
143
|
+
end
|
144
|
+
|
145
|
+
raise <<~MSG
|
146
|
+
Your nodejs binary failed to load autoprefixer script file,
|
147
|
+
please check if you're running a supported version (10, 12, 14+)
|
148
|
+
|
149
|
+
ENV["PATH"] = #{ENV["PATH"]}
|
150
|
+
binary = #{node_command}
|
151
|
+
MSG
|
152
|
+
when *SUPPORTED_RUNTIMES
|
153
|
+
raise
|
154
|
+
else
|
155
|
+
raise <<~MSG
|
156
|
+
Your ExecJS runtime #{ExecJS.runtime.name} isn't supported by autoprefixer-rails,
|
157
|
+
please switch to #{SUPPORTED_RUNTIMES.map(&:name).join(" or ")}
|
158
|
+
MSG
|
159
|
+
end
|
156
160
|
end
|
157
161
|
end
|
158
162
|
|
@@ -12,7 +12,7 @@ module AutoprefixerRails
|
|
12
12
|
# Sprockets 3 and 4 API
|
13
13
|
def self.call(input)
|
14
14
|
filename = input[:filename]
|
15
|
-
source
|
15
|
+
source = input[:data]
|
16
16
|
run(filename, source)
|
17
17
|
end
|
18
18
|
|
@@ -32,10 +32,10 @@ module AutoprefixerRails
|
|
32
32
|
def self.install(env)
|
33
33
|
if ::Sprockets::VERSION.to_f < 4
|
34
34
|
env.register_postprocessor("text/css",
|
35
|
-
|
35
|
+
::AutoprefixerRails::Sprockets)
|
36
36
|
else
|
37
37
|
env.register_bundle_processor("text/css",
|
38
|
-
|
38
|
+
::AutoprefixerRails::Sprockets)
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
@@ -43,17 +43,17 @@ module AutoprefixerRails
|
|
43
43
|
def self.uninstall(env)
|
44
44
|
if ::Sprockets::VERSION.to_f < 4
|
45
45
|
env.unregister_postprocessor("text/css",
|
46
|
-
|
46
|
+
::AutoprefixerRails::Sprockets)
|
47
47
|
else
|
48
48
|
env.unregister_bundle_processor("text/css",
|
49
|
-
|
49
|
+
::AutoprefixerRails::Sprockets)
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
53
|
# Sprockets 2 API new and render
|
54
54
|
def initialize(filename)
|
55
55
|
@filename = filename
|
56
|
-
@source
|
56
|
+
@source = yield
|
57
57
|
end
|
58
58
|
|
59
59
|
# Sprockets 2 API new and render
|
data/lib/autoprefixer-rails.rb
CHANGED
@@ -10,9 +10,9 @@ module AutoprefixerRails
|
|
10
10
|
params = {}
|
11
11
|
params[:overrideBrowserslist] = opts.delete(:overrideBrowserslist) if opts.key?(:overrideBrowserslist)
|
12
12
|
params[:browsers] = opts.delete(:browsers) if opts.key?(:browsers)
|
13
|
-
params[:cascade]
|
14
|
-
params[:remove]
|
15
|
-
params[:env]
|
13
|
+
params[:cascade] = opts.delete(:cascade) if opts.key?(:cascade)
|
14
|
+
params[:remove] = opts.delete(:remove) if opts.key?(:remove)
|
15
|
+
params[:env] = opts.delete(:env) if opts.key?(:env)
|
16
16
|
processor(params).process(css, opts)
|
17
17
|
end
|
18
18
|
|