rails_critical_css 0.3.0 → 0.3.5

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
  SHA256:
3
- metadata.gz: 7ba8d769ed5aba47dd6a6925c397afe6446f8d6bc75feb74c962c1168e9fb81a
4
- data.tar.gz: ab0e38a972dd6b4b32e9e369165e28660a459336db7c56a3dfc3fc6e41db3075
3
+ metadata.gz: 11feb85d447a9732e9a7b6d03ef4509a70cfdbdb719ed836587131832328ff07
4
+ data.tar.gz: 8661b57610c41a134f4faf8348556c9675d951185d78a4a289f8b4bb7347d91a
5
5
  SHA512:
6
- metadata.gz: 35a5b4197ea2825e9830ccb5911f5885f9b9183e717c2253283ecb3718b12726d39b61323ff1d214fc1cb1f7e0bf824d061da957db78566a431eb8726e2d65b1
7
- data.tar.gz: 05df760a440835378b2691ce6d76113e4fbbc2c13c5ce194af8045fff69da3ca1b081a965b72bdfa487e7b173596400f9d2d56bac20145cfa838934f3cd5860a
6
+ metadata.gz: 5da5032045838a0443b19cabc1d95126ac8a3f8f5db0c28d17f766f4f3f978448be1514328b8bbcfc1827c0d288b6e7628133b398b9457f81c7b0be188285385
7
+ data.tar.gz: 99f0a59695556344dd2948f99f774dd1745e698ca3bc72518bb6e2b428607caa56781e50cc696103099c5adbecae0fbf2239b23863bd6a77f1faa8825b60b13d
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
+
5
+ gem 'open3'
data/Gemfile.lock CHANGED
@@ -1,16 +1,18 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_critical_css (0.3.0)
4
+ rails_critical_css (0.3.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
+ open3 (0.1.0)
9
10
 
10
11
  PLATFORMS
11
12
  x86_64-linux
12
13
 
13
14
  DEPENDENCIES
15
+ open3
14
16
  rails_critical_css!
15
17
 
16
18
  BUNDLED WITH
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ![GitHub issues](https://img.shields.io/github/issues/mati365/rails-critical-css?style=flat-square)
6
6
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
7
7
 
8
- Generate on demand critical css for component actions with minimum effort.
8
+ Generate on demand critical css for component actions with minimum effort. It is pretty similar to: https://github.com/mudbugmedia/critical-path-css-rails but instead of pregenerating critical css this gem generates them in fly and dynamically.
9
9
 
10
10
  ## Installation
11
11
 
@@ -20,7 +20,7 @@ Install `penthouse` NPM package in your project. Be sure that node_modules/ dire
20
20
  In initializer:
21
21
 
22
22
  ```ruby
23
- CriticalCssGenerator.config do |c|
23
+ RailsCriticalCss.config do |c|
24
24
  c.keep_larger_media_queries = true
25
25
  c.height = 19999 # prevent CLS on for example footer
26
26
  end
@@ -0,0 +1 @@
1
+ File.write 'Makefile', "make:\n\t\ninstall:\n\truby install.rb\nclean:\n\t\n"
@@ -0,0 +1,3 @@
1
+ require_relative '../../lib/npm_commands'
2
+
3
+ NpmCommands.new.install('--production', '.') || raise('Error while installing npm dependencies')
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ class NpmCommands
4
+ def install(*args)
5
+ return false unless check_nodejs_installed
6
+ STDERR.puts 'Installing npm dependencies...'
7
+
8
+ install_status = Dir.chdir File.expand_path('..', File.dirname(__FILE__)) do
9
+ system('npm', 'install', *args)
10
+ end
11
+
12
+ STDERR.puts(
13
+ *if install_status
14
+ ['npm dependencies installed']
15
+ else
16
+ ['-' * 60,
17
+ 'Error: npm dependencies installation failed',
18
+ '-' * 60]
19
+ end
20
+ )
21
+
22
+ install_status
23
+ end
24
+ end
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module CriticalCssGenerator::Actions
3
+ module RailsCriticalCss::Actions
4
4
  class AfterRender
5
- include CriticalCssGenerator::Actions::Helpers
5
+ include RailsCriticalCss::Actions::Helpers
6
6
 
7
7
  def initialize(filter_options)
8
8
  @packed_options = filter_options.slice(
@@ -19,7 +19,7 @@ module CriticalCssGenerator::Actions
19
19
 
20
20
  return if cache_path == false
21
21
 
22
- CriticalCssGenerator::Jobs::Extractor.perform_if_semaphore_is_released(
22
+ RailsCriticalCss::Jobs::Extractor.perform_if_semaphore_is_released(
23
23
  html: controller.full_html_response,
24
24
  cache: {
25
25
  path: cache_path,
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module CriticalCssGenerator::Actions
3
+ module RailsCriticalCss::Actions
4
4
  class BeforeRender
5
- include CriticalCssGenerator::Actions::Helpers
5
+ include RailsCriticalCss::Actions::Helpers
6
6
 
7
7
  def initialize(filter_options)
8
8
  @packed_options = filter_options.slice(:css, :cache_key, :cache_prefix)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module CriticalCssGenerator::Actions::Helpers
3
+ module RailsCriticalCss::Actions::Helpers
4
4
  def group_assets_by_type(assets)
5
5
  return [] unless assets.present?
6
6
 
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module CriticalCssGenerator::Actions
3
+ module RailsCriticalCss::Actions
4
4
  extend ActiveSupport::Concern
5
5
 
6
6
  included do
7
- include CriticalCssGenerator::Helpers
7
+ include RailsCriticalCss::Helpers
8
8
 
9
9
  attr_accessor :lazy_css_blocks,
10
10
  :critical_css_assets,
@@ -50,8 +50,8 @@ module CriticalCssGenerator::Actions
50
50
  options[:cache_prefix] ||= 'critical-css'
51
51
 
52
52
  filter_options = options.extract!(:if, :unless).merge(only: actions)
53
- around_action CriticalCssGenerator::Actions::BeforeRender.new(options), filter_options
54
- after_action CriticalCssGenerator::Actions::AfterRender.new(options), filter_options
53
+ around_action RailsCriticalCss::Actions::BeforeRender.new(options), filter_options
54
+ after_action RailsCriticalCss::Actions::AfterRender.new(options), filter_options
55
55
  end
56
56
  end
57
57
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module CriticalCssGenerator
3
+ module RailsCriticalCss
4
4
  class Config
5
5
  class << self
6
6
  attr_writer :width, :height, :keep_larger_media_queries,
@@ -1,8 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module CriticalCssGenerator
3
+ require 'open3'
4
+ require 'json'
5
+
6
+ module RailsCriticalCss
7
+ LIB_ROOT = File.expand_path(File.join('..'), File.dirname(__FILE__))
8
+
4
9
  class Extractor
5
- include CriticalCssGenerator::Actions::Helpers
10
+ include RailsCriticalCss::Actions::Helpers
6
11
 
7
12
  def initialize(options)
8
13
  @html, @css = options.values_at(:html, :css)
@@ -13,13 +18,15 @@ module CriticalCssGenerator
13
18
  tmp_css_file = tmp_concat_assets_array(@css[:assets], extension: 'css')
14
19
  return nil unless tmp_html_file.present? && tmp_css_file.present?
15
20
 
16
- stdout, stderr = Open3.capture2e(
17
- 'node lib/critical_css_generator/js/css-extractor.js',
18
- stdin_data: Extractor.extractor_process_input(
19
- html_path: tmp_html_file.path,
20
- css_path: tmp_css_file.path,
21
+ stdout, stderr = Dir.chdir(LIB_ROOT) do
22
+ Open3.capture2e(
23
+ 'node js/css-extractor.js',
24
+ stdin_data: Extractor.extractor_process_input(
25
+ html_path: tmp_html_file.path,
26
+ css_path: tmp_css_file.path,
27
+ )
21
28
  )
22
- )
29
+ end
23
30
 
24
31
  if stderr.try(:success?) && !stdout.try(:include?, 'UnhandledPromiseRejectionWarning')
25
32
  [
@@ -37,7 +44,7 @@ module CriticalCssGenerator
37
44
  end
38
45
 
39
46
  def self.extractor_process_input(html_path:, css_path:)
40
- config = ::CriticalCssGenerator::Config.as_json_config({
47
+ config = ::RailsCriticalCss::Config.as_json_config({
41
48
  url: "file://#{html_path}",
42
49
  css: css_path,
43
50
  })
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module CriticalCssGenerator::Helpers
3
+ module RailsCriticalCss::Helpers
4
4
  def critical_css
5
5
  @critical_css_cache.try(:[], :css)
6
6
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module CriticalCssGenerator::Jobs
3
+ module RailsCriticalCss::Jobs
4
4
  class Extractor < ActiveJob::Base
5
5
  class << self
6
6
  def semaphore_key(cache_path)
@@ -18,7 +18,7 @@ module CriticalCssGenerator::Jobs
18
18
 
19
19
  def perform(cache:, css:, html:)
20
20
  semaphore = self.class.semaphore_key(cache[:path])
21
- critical_css = ::CriticalCssGenerator::Extractor.new(css: css, html: html).try_extract
21
+ critical_css = ::RailsCriticalCss::Extractor.new(css: css, html: html).try_extract
22
22
 
23
23
  # store it as wrapped css, do not regenerate for
24
24
  # each request critical_css if something go wrong
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
  require 'rails/railtie'
3
3
 
4
- module CriticalCssGenerator
4
+ module RailsCriticalCss
5
5
  class Railtie < Rails::Railtie
6
- config.eager_load_namespaces << CriticalCssGenerator
6
+ config.eager_load_namespaces << RailsCriticalCss
7
7
  end
8
8
  end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsCriticalCss
4
+ VERSION = '0.3.5'
5
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'open3'
4
+ require 'rails_critical_css/version'
5
+ require 'rails_critical_css/config'
6
+ require 'rails_critical_css/actions'
7
+ require 'rails_critical_css/actions/helpers'
8
+ require 'rails_critical_css/extractor'
9
+ require 'rails_critical_css/jobs/extractor'
10
+ require 'rails_critical_css/actions/after_render'
11
+ require 'rails_critical_css/actions/before_render'
12
+ require 'rails_critical_css/helpers'
13
+
14
+ module RailsCriticalCss
15
+ def self.config
16
+ yield RailsCriticalCss::Config
17
+ end
18
+ end
19
+
20
+ ActionController::Base.send(:include, RailsCriticalCss::Actions)
21
+ ActionView::Base.send(:include, RailsCriticalCss::Helpers)
data/package-lock.json ADDED
@@ -0,0 +1,787 @@
1
+ {
2
+ "name": "rails-critical-css",
3
+ "lockfileVersion": 2,
4
+ "requires": true,
5
+ "packages": {
6
+ "": {
7
+ "dependencies": {
8
+ "penthouse": "^2.3.2"
9
+ }
10
+ },
11
+ "node_modules/@types/mime-types": {
12
+ "version": "2.1.1",
13
+ "resolved": "https://registry.npmjs.org/@types/mime-types/-/mime-types-2.1.1.tgz",
14
+ "integrity": "sha512-vXOTGVSLR2jMw440moWTC7H19iUyLtP3Z1YTj7cSsubOICinjMxFeb/V57v9QdyyPGbbWolUFSSmSiRSn94tFw=="
15
+ },
16
+ "node_modules/agent-base": {
17
+ "version": "5.1.1",
18
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-5.1.1.tgz",
19
+ "integrity": "sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g==",
20
+ "engines": {
21
+ "node": ">= 6.0.0"
22
+ }
23
+ },
24
+ "node_modules/async-limiter": {
25
+ "version": "1.0.1",
26
+ "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
27
+ "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ=="
28
+ },
29
+ "node_modules/balanced-match": {
30
+ "version": "1.0.2",
31
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
32
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
33
+ },
34
+ "node_modules/brace-expansion": {
35
+ "version": "1.1.11",
36
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
37
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
38
+ "dependencies": {
39
+ "balanced-match": "^1.0.0",
40
+ "concat-map": "0.0.1"
41
+ }
42
+ },
43
+ "node_modules/buffer-crc32": {
44
+ "version": "0.2.13",
45
+ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
46
+ "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=",
47
+ "engines": {
48
+ "node": "*"
49
+ }
50
+ },
51
+ "node_modules/buffer-from": {
52
+ "version": "1.1.2",
53
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
54
+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="
55
+ },
56
+ "node_modules/concat-map": {
57
+ "version": "0.0.1",
58
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
59
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
60
+ },
61
+ "node_modules/concat-stream": {
62
+ "version": "1.6.2",
63
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
64
+ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
65
+ "engines": [
66
+ "node >= 0.8"
67
+ ],
68
+ "dependencies": {
69
+ "buffer-from": "^1.0.0",
70
+ "inherits": "^2.0.3",
71
+ "readable-stream": "^2.2.2",
72
+ "typedarray": "^0.0.6"
73
+ }
74
+ },
75
+ "node_modules/core-util-is": {
76
+ "version": "1.0.3",
77
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
78
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
79
+ },
80
+ "node_modules/css-mediaquery": {
81
+ "version": "0.1.2",
82
+ "resolved": "https://registry.npmjs.org/css-mediaquery/-/css-mediaquery-0.1.2.tgz",
83
+ "integrity": "sha1-aiw3NEkoYYYxxUvTPO3TAdoYvqA="
84
+ },
85
+ "node_modules/css-tree": {
86
+ "version": "1.0.0-alpha.28",
87
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.28.tgz",
88
+ "integrity": "sha512-joNNW1gCp3qFFzj4St6zk+Wh/NBv0vM5YbEreZk0SD4S23S+1xBKb6cLDg2uj4P4k/GUMlIm6cKIDqIG+vdt0w==",
89
+ "dependencies": {
90
+ "mdn-data": "~1.1.0",
91
+ "source-map": "^0.5.3"
92
+ },
93
+ "engines": {
94
+ "node": ">=0.10.0"
95
+ }
96
+ },
97
+ "node_modules/debug": {
98
+ "version": "4.3.2",
99
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
100
+ "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
101
+ "dependencies": {
102
+ "ms": "2.1.2"
103
+ },
104
+ "engines": {
105
+ "node": ">=6.0"
106
+ },
107
+ "peerDependenciesMeta": {
108
+ "supports-color": {
109
+ "optional": true
110
+ }
111
+ }
112
+ },
113
+ "node_modules/extract-zip": {
114
+ "version": "1.7.0",
115
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz",
116
+ "integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==",
117
+ "dependencies": {
118
+ "concat-stream": "^1.6.2",
119
+ "debug": "^2.6.9",
120
+ "mkdirp": "^0.5.4",
121
+ "yauzl": "^2.10.0"
122
+ },
123
+ "bin": {
124
+ "extract-zip": "cli.js"
125
+ }
126
+ },
127
+ "node_modules/extract-zip/node_modules/debug": {
128
+ "version": "2.6.9",
129
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
130
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
131
+ "dependencies": {
132
+ "ms": "2.0.0"
133
+ }
134
+ },
135
+ "node_modules/extract-zip/node_modules/ms": {
136
+ "version": "2.0.0",
137
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
138
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
139
+ },
140
+ "node_modules/fd-slicer": {
141
+ "version": "1.1.0",
142
+ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
143
+ "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=",
144
+ "dependencies": {
145
+ "pend": "~1.2.0"
146
+ }
147
+ },
148
+ "node_modules/fs.realpath": {
149
+ "version": "1.0.0",
150
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
151
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
152
+ },
153
+ "node_modules/glob": {
154
+ "version": "7.2.0",
155
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
156
+ "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
157
+ "dependencies": {
158
+ "fs.realpath": "^1.0.0",
159
+ "inflight": "^1.0.4",
160
+ "inherits": "2",
161
+ "minimatch": "^3.0.4",
162
+ "once": "^1.3.0",
163
+ "path-is-absolute": "^1.0.0"
164
+ },
165
+ "engines": {
166
+ "node": "*"
167
+ },
168
+ "funding": {
169
+ "url": "https://github.com/sponsors/isaacs"
170
+ }
171
+ },
172
+ "node_modules/https-proxy-agent": {
173
+ "version": "4.0.0",
174
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz",
175
+ "integrity": "sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==",
176
+ "dependencies": {
177
+ "agent-base": "5",
178
+ "debug": "4"
179
+ },
180
+ "engines": {
181
+ "node": ">= 6.0.0"
182
+ }
183
+ },
184
+ "node_modules/inflight": {
185
+ "version": "1.0.6",
186
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
187
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
188
+ "dependencies": {
189
+ "once": "^1.3.0",
190
+ "wrappy": "1"
191
+ }
192
+ },
193
+ "node_modules/inherits": {
194
+ "version": "2.0.4",
195
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
196
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
197
+ },
198
+ "node_modules/isarray": {
199
+ "version": "1.0.0",
200
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
201
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
202
+ },
203
+ "node_modules/jsesc": {
204
+ "version": "2.5.2",
205
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
206
+ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
207
+ "bin": {
208
+ "jsesc": "bin/jsesc"
209
+ },
210
+ "engines": {
211
+ "node": ">=4"
212
+ }
213
+ },
214
+ "node_modules/mdn-data": {
215
+ "version": "1.1.4",
216
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-1.1.4.tgz",
217
+ "integrity": "sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA=="
218
+ },
219
+ "node_modules/mime": {
220
+ "version": "2.5.2",
221
+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz",
222
+ "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==",
223
+ "bin": {
224
+ "mime": "cli.js"
225
+ },
226
+ "engines": {
227
+ "node": ">=4.0.0"
228
+ }
229
+ },
230
+ "node_modules/mime-db": {
231
+ "version": "1.50.0",
232
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz",
233
+ "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==",
234
+ "engines": {
235
+ "node": ">= 0.6"
236
+ }
237
+ },
238
+ "node_modules/mime-types": {
239
+ "version": "2.1.33",
240
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz",
241
+ "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==",
242
+ "dependencies": {
243
+ "mime-db": "1.50.0"
244
+ },
245
+ "engines": {
246
+ "node": ">= 0.6"
247
+ }
248
+ },
249
+ "node_modules/minimatch": {
250
+ "version": "3.0.4",
251
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
252
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
253
+ "dependencies": {
254
+ "brace-expansion": "^1.1.7"
255
+ },
256
+ "engines": {
257
+ "node": "*"
258
+ }
259
+ },
260
+ "node_modules/minimist": {
261
+ "version": "1.2.5",
262
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
263
+ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
264
+ },
265
+ "node_modules/mkdirp": {
266
+ "version": "0.5.5",
267
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
268
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
269
+ "dependencies": {
270
+ "minimist": "^1.2.5"
271
+ },
272
+ "bin": {
273
+ "mkdirp": "bin/cmd.js"
274
+ }
275
+ },
276
+ "node_modules/ms": {
277
+ "version": "2.1.2",
278
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
279
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
280
+ },
281
+ "node_modules/once": {
282
+ "version": "1.4.0",
283
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
284
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
285
+ "dependencies": {
286
+ "wrappy": "1"
287
+ }
288
+ },
289
+ "node_modules/path-is-absolute": {
290
+ "version": "1.0.1",
291
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
292
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
293
+ "engines": {
294
+ "node": ">=0.10.0"
295
+ }
296
+ },
297
+ "node_modules/pend": {
298
+ "version": "1.2.0",
299
+ "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
300
+ "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA="
301
+ },
302
+ "node_modules/penthouse": {
303
+ "version": "2.3.2",
304
+ "resolved": "https://registry.npmjs.org/penthouse/-/penthouse-2.3.2.tgz",
305
+ "integrity": "sha512-WKH7kVj46NKh5eHP9qQqYdaHX6vHCwBkG6yaYy0qRu28O6i9LEfmdNQNj6Teehr+6yqMImNaW3blxdcmtgXTiQ==",
306
+ "dependencies": {
307
+ "css-mediaquery": "^0.1.2",
308
+ "css-tree": "1.0.0-alpha.28",
309
+ "debug": "^4.1.1",
310
+ "jsesc": "^2.5.2",
311
+ "puppeteer": "2.1.1"
312
+ },
313
+ "engines": {
314
+ "node": ">=8.16.0"
315
+ }
316
+ },
317
+ "node_modules/process-nextick-args": {
318
+ "version": "2.0.1",
319
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
320
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
321
+ },
322
+ "node_modules/progress": {
323
+ "version": "2.0.3",
324
+ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
325
+ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
326
+ "engines": {
327
+ "node": ">=0.4.0"
328
+ }
329
+ },
330
+ "node_modules/proxy-from-env": {
331
+ "version": "1.1.0",
332
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
333
+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
334
+ },
335
+ "node_modules/puppeteer": {
336
+ "version": "2.1.1",
337
+ "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-2.1.1.tgz",
338
+ "integrity": "sha512-LWzaDVQkk1EPiuYeTOj+CZRIjda4k2s5w4MK4xoH2+kgWV/SDlkYHmxatDdtYrciHUKSXTsGgPgPP8ILVdBsxg==",
339
+ "hasInstallScript": true,
340
+ "dependencies": {
341
+ "@types/mime-types": "^2.1.0",
342
+ "debug": "^4.1.0",
343
+ "extract-zip": "^1.6.6",
344
+ "https-proxy-agent": "^4.0.0",
345
+ "mime": "^2.0.3",
346
+ "mime-types": "^2.1.25",
347
+ "progress": "^2.0.1",
348
+ "proxy-from-env": "^1.0.0",
349
+ "rimraf": "^2.6.1",
350
+ "ws": "^6.1.0"
351
+ },
352
+ "engines": {
353
+ "node": ">=8.16.0"
354
+ }
355
+ },
356
+ "node_modules/readable-stream": {
357
+ "version": "2.3.7",
358
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
359
+ "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
360
+ "dependencies": {
361
+ "core-util-is": "~1.0.0",
362
+ "inherits": "~2.0.3",
363
+ "isarray": "~1.0.0",
364
+ "process-nextick-args": "~2.0.0",
365
+ "safe-buffer": "~5.1.1",
366
+ "string_decoder": "~1.1.1",
367
+ "util-deprecate": "~1.0.1"
368
+ }
369
+ },
370
+ "node_modules/rimraf": {
371
+ "version": "2.7.1",
372
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
373
+ "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
374
+ "dependencies": {
375
+ "glob": "^7.1.3"
376
+ },
377
+ "bin": {
378
+ "rimraf": "bin.js"
379
+ }
380
+ },
381
+ "node_modules/safe-buffer": {
382
+ "version": "5.1.2",
383
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
384
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
385
+ },
386
+ "node_modules/source-map": {
387
+ "version": "0.5.7",
388
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
389
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
390
+ "engines": {
391
+ "node": ">=0.10.0"
392
+ }
393
+ },
394
+ "node_modules/string_decoder": {
395
+ "version": "1.1.1",
396
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
397
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
398
+ "dependencies": {
399
+ "safe-buffer": "~5.1.0"
400
+ }
401
+ },
402
+ "node_modules/typedarray": {
403
+ "version": "0.0.6",
404
+ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
405
+ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
406
+ },
407
+ "node_modules/util-deprecate": {
408
+ "version": "1.0.2",
409
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
410
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
411
+ },
412
+ "node_modules/wrappy": {
413
+ "version": "1.0.2",
414
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
415
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
416
+ },
417
+ "node_modules/ws": {
418
+ "version": "6.2.2",
419
+ "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz",
420
+ "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==",
421
+ "dependencies": {
422
+ "async-limiter": "~1.0.0"
423
+ }
424
+ },
425
+ "node_modules/yauzl": {
426
+ "version": "2.10.0",
427
+ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
428
+ "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=",
429
+ "dependencies": {
430
+ "buffer-crc32": "~0.2.3",
431
+ "fd-slicer": "~1.1.0"
432
+ }
433
+ }
434
+ },
435
+ "dependencies": {
436
+ "@types/mime-types": {
437
+ "version": "2.1.1",
438
+ "resolved": "https://registry.npmjs.org/@types/mime-types/-/mime-types-2.1.1.tgz",
439
+ "integrity": "sha512-vXOTGVSLR2jMw440moWTC7H19iUyLtP3Z1YTj7cSsubOICinjMxFeb/V57v9QdyyPGbbWolUFSSmSiRSn94tFw=="
440
+ },
441
+ "agent-base": {
442
+ "version": "5.1.1",
443
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-5.1.1.tgz",
444
+ "integrity": "sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g=="
445
+ },
446
+ "async-limiter": {
447
+ "version": "1.0.1",
448
+ "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
449
+ "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ=="
450
+ },
451
+ "balanced-match": {
452
+ "version": "1.0.2",
453
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
454
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
455
+ },
456
+ "brace-expansion": {
457
+ "version": "1.1.11",
458
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
459
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
460
+ "requires": {
461
+ "balanced-match": "^1.0.0",
462
+ "concat-map": "0.0.1"
463
+ }
464
+ },
465
+ "buffer-crc32": {
466
+ "version": "0.2.13",
467
+ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
468
+ "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI="
469
+ },
470
+ "buffer-from": {
471
+ "version": "1.1.2",
472
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
473
+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="
474
+ },
475
+ "concat-map": {
476
+ "version": "0.0.1",
477
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
478
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
479
+ },
480
+ "concat-stream": {
481
+ "version": "1.6.2",
482
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
483
+ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
484
+ "requires": {
485
+ "buffer-from": "^1.0.0",
486
+ "inherits": "^2.0.3",
487
+ "readable-stream": "^2.2.2",
488
+ "typedarray": "^0.0.6"
489
+ }
490
+ },
491
+ "core-util-is": {
492
+ "version": "1.0.3",
493
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
494
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
495
+ },
496
+ "css-mediaquery": {
497
+ "version": "0.1.2",
498
+ "resolved": "https://registry.npmjs.org/css-mediaquery/-/css-mediaquery-0.1.2.tgz",
499
+ "integrity": "sha1-aiw3NEkoYYYxxUvTPO3TAdoYvqA="
500
+ },
501
+ "css-tree": {
502
+ "version": "1.0.0-alpha.28",
503
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.28.tgz",
504
+ "integrity": "sha512-joNNW1gCp3qFFzj4St6zk+Wh/NBv0vM5YbEreZk0SD4S23S+1xBKb6cLDg2uj4P4k/GUMlIm6cKIDqIG+vdt0w==",
505
+ "requires": {
506
+ "mdn-data": "~1.1.0",
507
+ "source-map": "^0.5.3"
508
+ }
509
+ },
510
+ "debug": {
511
+ "version": "4.3.2",
512
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
513
+ "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
514
+ "requires": {
515
+ "ms": "2.1.2"
516
+ }
517
+ },
518
+ "extract-zip": {
519
+ "version": "1.7.0",
520
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz",
521
+ "integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==",
522
+ "requires": {
523
+ "concat-stream": "^1.6.2",
524
+ "debug": "^2.6.9",
525
+ "mkdirp": "^0.5.4",
526
+ "yauzl": "^2.10.0"
527
+ },
528
+ "dependencies": {
529
+ "debug": {
530
+ "version": "2.6.9",
531
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
532
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
533
+ "requires": {
534
+ "ms": "2.0.0"
535
+ }
536
+ },
537
+ "ms": {
538
+ "version": "2.0.0",
539
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
540
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
541
+ }
542
+ }
543
+ },
544
+ "fd-slicer": {
545
+ "version": "1.1.0",
546
+ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
547
+ "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=",
548
+ "requires": {
549
+ "pend": "~1.2.0"
550
+ }
551
+ },
552
+ "fs.realpath": {
553
+ "version": "1.0.0",
554
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
555
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
556
+ },
557
+ "glob": {
558
+ "version": "7.2.0",
559
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
560
+ "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
561
+ "requires": {
562
+ "fs.realpath": "^1.0.0",
563
+ "inflight": "^1.0.4",
564
+ "inherits": "2",
565
+ "minimatch": "^3.0.4",
566
+ "once": "^1.3.0",
567
+ "path-is-absolute": "^1.0.0"
568
+ }
569
+ },
570
+ "https-proxy-agent": {
571
+ "version": "4.0.0",
572
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz",
573
+ "integrity": "sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==",
574
+ "requires": {
575
+ "agent-base": "5",
576
+ "debug": "4"
577
+ }
578
+ },
579
+ "inflight": {
580
+ "version": "1.0.6",
581
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
582
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
583
+ "requires": {
584
+ "once": "^1.3.0",
585
+ "wrappy": "1"
586
+ }
587
+ },
588
+ "inherits": {
589
+ "version": "2.0.4",
590
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
591
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
592
+ },
593
+ "isarray": {
594
+ "version": "1.0.0",
595
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
596
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
597
+ },
598
+ "jsesc": {
599
+ "version": "2.5.2",
600
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
601
+ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA=="
602
+ },
603
+ "mdn-data": {
604
+ "version": "1.1.4",
605
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-1.1.4.tgz",
606
+ "integrity": "sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA=="
607
+ },
608
+ "mime": {
609
+ "version": "2.5.2",
610
+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz",
611
+ "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg=="
612
+ },
613
+ "mime-db": {
614
+ "version": "1.50.0",
615
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz",
616
+ "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A=="
617
+ },
618
+ "mime-types": {
619
+ "version": "2.1.33",
620
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz",
621
+ "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==",
622
+ "requires": {
623
+ "mime-db": "1.50.0"
624
+ }
625
+ },
626
+ "minimatch": {
627
+ "version": "3.0.4",
628
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
629
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
630
+ "requires": {
631
+ "brace-expansion": "^1.1.7"
632
+ }
633
+ },
634
+ "minimist": {
635
+ "version": "1.2.5",
636
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
637
+ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
638
+ },
639
+ "mkdirp": {
640
+ "version": "0.5.5",
641
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
642
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
643
+ "requires": {
644
+ "minimist": "^1.2.5"
645
+ }
646
+ },
647
+ "ms": {
648
+ "version": "2.1.2",
649
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
650
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
651
+ },
652
+ "once": {
653
+ "version": "1.4.0",
654
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
655
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
656
+ "requires": {
657
+ "wrappy": "1"
658
+ }
659
+ },
660
+ "path-is-absolute": {
661
+ "version": "1.0.1",
662
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
663
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
664
+ },
665
+ "pend": {
666
+ "version": "1.2.0",
667
+ "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
668
+ "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA="
669
+ },
670
+ "penthouse": {
671
+ "version": "2.3.2",
672
+ "resolved": "https://registry.npmjs.org/penthouse/-/penthouse-2.3.2.tgz",
673
+ "integrity": "sha512-WKH7kVj46NKh5eHP9qQqYdaHX6vHCwBkG6yaYy0qRu28O6i9LEfmdNQNj6Teehr+6yqMImNaW3blxdcmtgXTiQ==",
674
+ "requires": {
675
+ "css-mediaquery": "^0.1.2",
676
+ "css-tree": "1.0.0-alpha.28",
677
+ "debug": "^4.1.1",
678
+ "jsesc": "^2.5.2",
679
+ "puppeteer": "2.1.1"
680
+ }
681
+ },
682
+ "process-nextick-args": {
683
+ "version": "2.0.1",
684
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
685
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
686
+ },
687
+ "progress": {
688
+ "version": "2.0.3",
689
+ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
690
+ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA=="
691
+ },
692
+ "proxy-from-env": {
693
+ "version": "1.1.0",
694
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
695
+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
696
+ },
697
+ "puppeteer": {
698
+ "version": "2.1.1",
699
+ "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-2.1.1.tgz",
700
+ "integrity": "sha512-LWzaDVQkk1EPiuYeTOj+CZRIjda4k2s5w4MK4xoH2+kgWV/SDlkYHmxatDdtYrciHUKSXTsGgPgPP8ILVdBsxg==",
701
+ "requires": {
702
+ "@types/mime-types": "^2.1.0",
703
+ "debug": "^4.1.0",
704
+ "extract-zip": "^1.6.6",
705
+ "https-proxy-agent": "^4.0.0",
706
+ "mime": "^2.0.3",
707
+ "mime-types": "^2.1.25",
708
+ "progress": "^2.0.1",
709
+ "proxy-from-env": "^1.0.0",
710
+ "rimraf": "^2.6.1",
711
+ "ws": "^6.1.0"
712
+ }
713
+ },
714
+ "readable-stream": {
715
+ "version": "2.3.7",
716
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
717
+ "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
718
+ "requires": {
719
+ "core-util-is": "~1.0.0",
720
+ "inherits": "~2.0.3",
721
+ "isarray": "~1.0.0",
722
+ "process-nextick-args": "~2.0.0",
723
+ "safe-buffer": "~5.1.1",
724
+ "string_decoder": "~1.1.1",
725
+ "util-deprecate": "~1.0.1"
726
+ }
727
+ },
728
+ "rimraf": {
729
+ "version": "2.7.1",
730
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
731
+ "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
732
+ "requires": {
733
+ "glob": "^7.1.3"
734
+ }
735
+ },
736
+ "safe-buffer": {
737
+ "version": "5.1.2",
738
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
739
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
740
+ },
741
+ "source-map": {
742
+ "version": "0.5.7",
743
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
744
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
745
+ },
746
+ "string_decoder": {
747
+ "version": "1.1.1",
748
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
749
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
750
+ "requires": {
751
+ "safe-buffer": "~5.1.0"
752
+ }
753
+ },
754
+ "typedarray": {
755
+ "version": "0.0.6",
756
+ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
757
+ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
758
+ },
759
+ "util-deprecate": {
760
+ "version": "1.0.2",
761
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
762
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
763
+ },
764
+ "wrappy": {
765
+ "version": "1.0.2",
766
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
767
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
768
+ },
769
+ "ws": {
770
+ "version": "6.2.2",
771
+ "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz",
772
+ "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==",
773
+ "requires": {
774
+ "async-limiter": "~1.0.0"
775
+ }
776
+ },
777
+ "yauzl": {
778
+ "version": "2.10.0",
779
+ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
780
+ "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=",
781
+ "requires": {
782
+ "buffer-crc32": "~0.2.3",
783
+ "fd-slicer": "~1.1.0"
784
+ }
785
+ }
786
+ }
787
+ }
data/package.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "dependencies": {
3
+ "penthouse": "^2.3.2"
4
+ }
5
+ }
@@ -1,16 +1,21 @@
1
- $:.push File.expand_path("../lib", __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+
4
+ require 'rails_critical_css/version'
2
5
 
3
6
  Gem::Specification.new do |s|
4
7
  s.name = 'rails_critical_css'
5
- s.version = '0.3.0'
8
+ s.version = RailsCriticalCss::VERSION
9
+ s.platform = Gem::Platform::RUBY
6
10
  s.summary = 'Critical CSS rails generator'
7
11
  s.authors = ['Mateusz Bagiński']
8
12
 
9
13
  s.license = 'MIT'
10
14
  s.email = 'cziken58@gmail.com'
11
15
  s.homepage = 'https://github.com/Mati365/rails-critical-css'
12
- s.files = `git ls-files`.split($/)
13
-
14
- s.require_paths << 'lib'
16
+ s.files = `git ls-files`.split("\n")
17
+ s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
18
+ s.extensions = ['ext/npm/extconfig.rb']
19
+ s.require_paths = ['lib']
15
20
  s.required_ruby_version = '>= 2.4.0'
16
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_critical_css
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mateusz Bagiński
@@ -13,7 +13,8 @@ dependencies: []
13
13
  description:
14
14
  email: cziken58@gmail.com
15
15
  executables: []
16
- extensions: []
16
+ extensions:
17
+ - ext/npm/extconfig.rb
17
18
  extra_rdoc_files: []
18
19
  files:
19
20
  - ".gitignore"
@@ -22,17 +23,23 @@ files:
22
23
  - LICENSE
23
24
  - README.md
24
25
  - Rakefile
25
- - lib/critical_css_generator.rb
26
- - lib/critical_css_generator/actions.rb
27
- - lib/critical_css_generator/actions/after_render.rb
28
- - lib/critical_css_generator/actions/before_render.rb
29
- - lib/critical_css_generator/actions/helpers.rb
30
- - lib/critical_css_generator/config.rb
31
- - lib/critical_css_generator/extractor.rb
32
- - lib/critical_css_generator/helpers.rb
33
- - lib/critical_css_generator/jobs/extractor.rb
34
- - lib/critical_css_generator/railtie.rb
26
+ - ext/npm/extconfig.rb
27
+ - ext/npm/install.rb
35
28
  - lib/js/css-extractor.js
29
+ - lib/npm_commands.rb
30
+ - lib/rails_critical_css.rb
31
+ - lib/rails_critical_css/actions.rb
32
+ - lib/rails_critical_css/actions/after_render.rb
33
+ - lib/rails_critical_css/actions/before_render.rb
34
+ - lib/rails_critical_css/actions/helpers.rb
35
+ - lib/rails_critical_css/config.rb
36
+ - lib/rails_critical_css/extractor.rb
37
+ - lib/rails_critical_css/helpers.rb
38
+ - lib/rails_critical_css/jobs/extractor.rb
39
+ - lib/rails_critical_css/railtie.rb
40
+ - lib/rails_critical_css/version.rb
41
+ - package-lock.json
42
+ - package.json
36
43
  - rails_critical_css.gemspec
37
44
  homepage: https://github.com/Mati365/rails-critical-css
38
45
  licenses:
@@ -42,7 +49,6 @@ post_install_message:
42
49
  rdoc_options: []
43
50
  require_paths:
44
51
  - lib
45
- - lib
46
52
  required_ruby_version: !ruby/object:Gem::Requirement
47
53
  requirements:
48
54
  - - ">="
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'open3'
4
- require 'critical_css_generator/config'
5
- require 'critical_css_generator/actions'
6
- require 'critical_css_generator/actions/helpers'
7
- require 'critical_css_generator/extractor'
8
- require 'critical_css_generator/jobs/extractor'
9
- require 'critical_css_generator/actions/after_render'
10
- require 'critical_css_generator/actions/before_render'
11
- require 'critical_css_generator/helpers'
12
- require 'critical_css_generator/railtie'
13
-
14
- module CriticalCssGenerator
15
- def self.config
16
- yield CriticalCssGenerator::Config
17
- end
18
- end
19
-
20
- ActionController::Base.send(:include, CriticalCssGenerator::Actions)
21
- ActionView::Base.send(:include, CriticalCssGenerator::Helpers)