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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c1525c6f397de1122e002778594018bbe2da00e
|
4
|
+
data.tar.gz: 3a24baa0113d49348d3c8f7bf575eb650dd22de5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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:
|