middleman-autoprefixer 0.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd87e94f6927472934c7945e6546ded6bfd70c1f
4
- data.tar.gz: 3d89bf50a428c2adaf418f56003ef739bff5dee6
3
+ metadata.gz: b9ecf084f05c73eaf7b665adc749ff4e986ada56
4
+ data.tar.gz: a95a5ad44c1e34dae15e5987f3c5a99af984cb03
5
5
  SHA512:
6
- metadata.gz: 04fee1f8c90ddd24afc9909592ca3f969c832aef64b11f2922e15e8db838752302ba73e125254b000753f6122ffaa5802600f64615a41917c37fb37e75689afb
7
- data.tar.gz: da74e233462d93b8fc69013b038af9a0365b01de952bd421d1ee0c7e42526892bd40ec9794070acad8a65a166c9f43f0ddae05b5acb2163cf988f540e3224a5b
6
+ metadata.gz: 399927ecf9b3317e68520964a05cb3fbf753e4e199535230c118318b9457e20b1f7fb27651d934ef964730256070f36472f854ee8966abec3bb30620e686cf1c
7
+ data.tar.gz: 433ea849d56b40f69f1e9c2bb80d81d23f680fcf1dacceba1e9e88e788882e85a55cb2fb109f58e6706d8c560884a54df7a29c0d2461a948146c5bc09e8b5a17
data/README.md CHANGED
@@ -22,7 +22,17 @@ After installation, simply activate the extension in your project’s `config.rb
22
22
  activate :autoprefixer
23
23
  ```
24
24
 
25
- *Browser-specific configuration is planned for the future versions of the extension.*
25
+ #### Browsers
26
+
27
+ Optionally, you can specify `browsers` as a string or array of strings with accoradance to [Autoprefixer’s documentation](https://github.com/ai/autoprefixer#browsers). There are a few ways to set the option—two examples:
28
+
29
+ ```ruby
30
+ activate :autoprefixer, browsers: 'last 1 version'
31
+
32
+ activate :autoprefixer do |config|
33
+ config.browsers = ['last 2 versions', 'ie 8', 'ie 9']
34
+ end
35
+ ```
26
36
 
27
37
  ## Credits
28
38
 
@@ -2,10 +2,18 @@ require 'autoprefixer-rails'
2
2
 
3
3
  module Middleman
4
4
  module Autoprefixer
5
+ class Options < OpenStruct; end
6
+
5
7
  class << self
6
8
  def registered(app, options_hash={}, &block)
9
+ @@options = Options.new(options_hash)
10
+ yield @@options if block_given?
11
+
12
+ browsers = Array(@@options.browsers)
13
+ browsers = nil if browsers.empty?
14
+
7
15
  app.after_configuration do
8
- AutoprefixerRails.install(sprockets)
16
+ AutoprefixerRails.install(sprockets, browsers)
9
17
  end
10
18
  end
11
19
  alias :included :registered
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Autoprefixer
3
- VERSION = '0.1'
3
+ VERSION = '0.2'
4
4
  end
5
5
  end
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ['Dominik Porada']
10
10
  spec.email = ['dominik@porada.co']
11
11
  spec.summary = 'Autoprefixer integration with Middleman'
12
- spec.summary = 'Automatically add vendor prefixes to CSS rules in the stylesheets ' +
12
+ spec.description = 'Automatically add vendor prefixes to CSS rules in the stylesheets ' +
13
13
  'served in your Middleman project using values from Can I Use.'
14
14
  spec.homepage = 'https://github.com/porada/middleman-autoprefixer'
15
15
  spec.license = 'MIT'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-autoprefixer
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '0.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominik Porada
@@ -66,7 +66,8 @@ dependencies:
66
66
  - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description:
69
+ description: Automatically add vendor prefixes to CSS rules in the stylesheets served
70
+ in your Middleman project using values from Can I Use.
70
71
  email:
71
72
  - dominik@porada.co
72
73
  executables: []
@@ -105,7 +106,6 @@ rubyforge_project:
105
106
  rubygems_version: 2.0.5
106
107
  signing_key:
107
108
  specification_version: 4
108
- summary: Automatically add vendor prefixes to CSS rules in the stylesheets served
109
- in your Middleman project using values from Can I Use.
109
+ summary: Autoprefixer integration with Middleman
110
110
  test_files: []
111
111
  has_rdoc: