autoprefixer-rails 6.1.0 → 6.1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +2 -2
- data/lib/autoprefixer-rails.rb +1 -2
- data/lib/autoprefixer-rails/sprockets.rb +14 -7
- data/lib/autoprefixer-rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb1e69157476b4a553fb1f438a244d322803d568
|
4
|
+
data.tar.gz: 0759bd6c304a12921c823b5dc7ed1be5bf3d3253
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0553ffc85e8e2c6ddae18624d0264ae3f3478a8a9cd1ccf980963e719813172d96e3ec42df39c5f9706d2cb2b43031cb115f8d5afc140ca36f28d36716572e86
|
7
|
+
data.tar.gz: 415eca2567d2476f80f00b888d4405edd008c35a1b32d586acd3ffa076338fd6be261e39399b886815c8c5e4a18209aa2e9f239c685aae6b8c2aee226888d552
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -102,10 +102,10 @@ You can get what properties will be changed using a Rake task:
|
|
102
102
|
rake autoprefixer:info
|
103
103
|
```
|
104
104
|
|
105
|
-
To disable Autoprefixer just remove
|
105
|
+
To disable Autoprefixer just remove postprocessor:
|
106
106
|
|
107
107
|
```ruby
|
108
|
-
Rails.application.assets.unregister_postprocessor('text/css',
|
108
|
+
Rails.application.assets.unregister_postprocessor('text/css', :autoprefixer)
|
109
109
|
```
|
110
110
|
|
111
111
|
[Browserslist docs]: https://github.com/ai/browserslist
|
data/lib/autoprefixer-rails.rb
CHANGED
@@ -15,8 +15,7 @@ module AutoprefixerRails
|
|
15
15
|
# Add Autoprefixer for Sprockets environment in `assets`.
|
16
16
|
# You can specify `browsers` actual in your project.
|
17
17
|
def self.install(assets, params = { })
|
18
|
-
|
19
|
-
assets.register_postprocessor('text/css', ::AutoprefixerRails::Sprockets)
|
18
|
+
Sprockets.new( processor(params) ).install(assets)
|
20
19
|
end
|
21
20
|
|
22
21
|
# Cache processor instances
|
@@ -1,17 +1,17 @@
|
|
1
1
|
require 'pathname'
|
2
2
|
|
3
3
|
module AutoprefixerRails
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
def processor=(processor)
|
4
|
+
# Register autoprefixer postprocessor in Sprockets and fix common issues
|
5
|
+
class Sprockets
|
6
|
+
def initialize(processor)
|
9
7
|
@processor = processor
|
10
8
|
end
|
11
9
|
|
12
10
|
# Add prefixes for `css`
|
13
|
-
def
|
14
|
-
|
11
|
+
def process(context, css)
|
12
|
+
input = context.pathname.to_s
|
13
|
+
output = input.chomp(File.extname(input)) + '.css'
|
14
|
+
result = @processor.process(css, from: input, to: output)
|
15
15
|
|
16
16
|
result.warnings.each do |warning|
|
17
17
|
$stderr.puts "autoprefixer: #{ warning }"
|
@@ -19,5 +19,12 @@ module AutoprefixerRails
|
|
19
19
|
|
20
20
|
result.css
|
21
21
|
end
|
22
|
+
|
23
|
+
# Register postprocessor in Sprockets depend on issues with other gems
|
24
|
+
def install(assets)
|
25
|
+
assets.register_postprocessor('text/css', :autoprefixer) do |context, css|
|
26
|
+
process(context, css)
|
27
|
+
end
|
28
|
+
end
|
22
29
|
end
|
23
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autoprefixer-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.0
|
4
|
+
version: 6.1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Sitnik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: execjs
|