From 5b60785e0eab9fb4574c02beca3a8e11fc3c34c7 Mon Sep 17 00:00:00 2001 From: JuanJoseGonGi Date: Wed, 7 Nov 2018 14:19:44 -0500 Subject: [PATCH] Updated completely --- .../critters-webpack-plugin-tests.ts | 4 ++++ types/critters-webpack-plugin/index.d.ts | 22 ++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/types/critters-webpack-plugin/critters-webpack-plugin-tests.ts b/types/critters-webpack-plugin/critters-webpack-plugin-tests.ts index cb975b1cc0..69d520eaff 100644 --- a/types/critters-webpack-plugin/critters-webpack-plugin-tests.ts +++ b/types/critters-webpack-plugin/critters-webpack-plugin-tests.ts @@ -7,4 +7,8 @@ new Critters({ preloadFonts: true, keyframes: 'critical', noscriptFallback: true, + inlineThreshold: 0, + mergeStylesheets: true, + pruneSource: true, + minimumExternalSize: 0, }); diff --git a/types/critters-webpack-plugin/index.d.ts b/types/critters-webpack-plugin/index.d.ts index df758a42e7..6a6a831e72 100644 --- a/types/critters-webpack-plugin/index.d.ts +++ b/types/critters-webpack-plugin/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for critters-webpack-plugin 1.3 +// Type definitions for critters-webpack-plugin 2.0.1 // Project: https://github.com/GoogleChromeLabs/critters // Definitions by: Juan José González Giraldo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -18,6 +18,26 @@ declare namespace Critters { * @default true */ external?: boolean; + /** + * Inline external stylesheets smaller than a given size. + * @default 0 + */ + inlineThreshold?: number; + /** + * If the non-critical external stylesheet would be below this size, just inline it. + * @default 0 + */ + minimumExternalSize?: number; + /** + * Remove inlined rules from the external stylesheet. + * @default true + */ + pruneSource?: boolean; + /** + * Merged inlined stylesheets into a single