middleman-critical_css 0.0.1 → 0.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: f5d2286d77d598ed18b02e5974e92cd46e92fce4
4
- data.tar.gz: 77ad0a02666488f1831aa7d00c72263d40f20fb6
3
+ metadata.gz: 6c1525c6f397de1122e002778594018bbe2da00e
4
+ data.tar.gz: 3a24baa0113d49348d3c8f7bf575eb650dd22de5
5
5
  SHA512:
6
- metadata.gz: ac9b1f4368d463c0fbf20c90e0d5fd07f8936e4a3daab335166b59b8b9681eec7199de5519c572802f9a1e46e3af70391a4f6adc257ddab672b6f2f11f184253
7
- data.tar.gz: f196051caf53ffb51bb1393a3373bfdb18ce2c2e96bc0c23951ff3de3a92dbfc949177ed4f30cb570d07c7884115df85f01d5ab8045b7872bd540a66fe7c7db0
6
+ metadata.gz: ad337d2bddf821113160b899107edf87ab2f6a5dc1b4a703985bedbc5984e93f58881e8ca9910babfa16db7807237598b8693ea9a614335ff4831569b6f4d51d
7
+ data.tar.gz: a0247108187b903c550047d36a9231143066210fa515e490423ecc27b146f44f80ac96dc551560b23bb04de3c6eb80ccf8057ffd85112e1c8412454bfa6139b4
@@ -4,6 +4,8 @@ module Middleman
4
4
  class CriticalCssExtension < Extension
5
5
  option :binary, "node_modules/.bin/critical", "The criticalCSS binary to use"
6
6
  option :minify, true, "Minify inlined CSS"
7
+ option :witdh, 1920, "Viewport width"
8
+ option :height, 1080, "Viewport height"
7
9
 
8
10
  def after_build
9
11
  Dir.glob(html_files) do |file|
@@ -25,7 +27,9 @@ module Middleman
25
27
  asset_path,
26
28
  "--base", app.config[:build_dir],
27
29
  "--htmlTarget", file,
28
- "--extract", "--inline"
30
+ "--extract", "--inline",
31
+ "--width", options.width,
32
+ "--height", options.height,
29
33
  ]
30
34
  args << "--minify" if options.minify
31
35
 
Binary file
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "middleman-critical_css"
7
- spec.version = "0.0.1"
7
+ spec.version = "0.0.2"
8
8
  spec.authors = ["Miguel Palhas"]
9
9
  spec.email = ["miguel@subvisual.co"]
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-critical_css
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Palhas
@@ -39,6 +39,7 @@ files:
39
39
  - lib/middleman-critical_css.rb
40
40
  - lib/middleman-critical_css/extension.rb
41
41
  - lib/middleman-extension.rb
42
+ - middleman-critical_css-0.0.1.gem
42
43
  - middleman-critical_css.gemspec
43
44
  homepage: https://github.com/subvisual/middleman-critical_css
44
45
  licenses: