From eb599e2be73a9dbd648b51821547141d4c3daad4 Mon Sep 17 00:00:00 2001 From: Nikola Hristov Date: Sun, 30 Jul 2023 20:07:21 +0300 Subject: [PATCH] squash! --- dist/index.d.ts | 4 ---- dist/index.js | 1 - dist/options/critters.d.ts | 11 ----------- dist/options/critters.js | 1 - dist/options/index.d.ts | 8 -------- dist/options/index.js | 1 - 6 files changed, 26 deletions(-) delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/options/critters.d.ts delete mode 100644 dist/options/critters.js delete mode 100644 dist/options/index.d.ts delete mode 100644 dist/options/index.js diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 9a5daed..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { AstroIntegration } from "astro"; -import type { Options } from "./options/index.js"; -declare const _default: (options?: Options) => AstroIntegration; -export default _default; diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index ce4e0f4..0000000 --- a/dist/index.js +++ /dev/null @@ -1 +0,0 @@ -import c from"critters";import{files as m}from"files-pipe";import l from"files-pipe/dist/lib/apply-to.js";import s from"files-pipe/dist/lib/deepmerge.js";import{fileURLToPath as d}from"url";import a from"./options/index.js";var O=(o={})=>{for(const e in o)Object.prototype.hasOwnProperty.call(o,e)&&o[e]===!0&&(o[e]=a[e]);const t=s(a,o),i=new Set;if(typeof t.path<"u"&&(t.path instanceof Array||t.path instanceof Set))for(const e of t.path)i.add(e);return{name:"astro-critters",hooks:{"astro:build:done":async({dir:e})=>{if(i.size||i.add(e),!!t.critters)for(const p of i){const n=await l(p,r=>r instanceof URL?d(r):r),f=new c(s(t.critters,{path:n instanceof Map?n.keys().next().value:n,logLevel:(()=>{switch(t.logger){case 0:return"silent";case 1:return"silent";case 2:return"info";default:return"info"}})()}));await(await(await(await new m(t.logger).in(p)).by("**/*.html")).not(t.exclude)).pipe(s(a.pipe,{wrote:async r=>f.process(r.buffer.toString())}))}}}}};export{O as default}; diff --git a/dist/options/critters.d.ts b/dist/options/critters.d.ts deleted file mode 100644 index db472ac..0000000 --- a/dist/options/critters.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { Options as CrittersOptions } from "critters"; -export interface CRITTERS extends CrittersOptions { - [key: string]: any; -} -declare const _default: { - preload: string; - inlineFonts: boolean; - compress: boolean; - pruneSource: boolean; -}; -export default _default; diff --git a/dist/options/critters.js b/dist/options/critters.js deleted file mode 100644 index b17496f..0000000 --- a/dist/options/critters.js +++ /dev/null @@ -1 +0,0 @@ -var e={preload:"media",inlineFonts:!0,compress:!0,pruneSource:!0};export{e as default}; diff --git a/dist/options/index.d.ts b/dist/options/index.d.ts deleted file mode 100644 index 6af763c..0000000 --- a/dist/options/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { Options as OptionsBase } from "files-pipe/dist/options/index.js"; -import type { CRITTERS } from "./critters.js"; -export interface Options extends OptionsBase { - [key: string]: any; - critters?: boolean | CRITTERS; -} -declare const _default: Options; -export default _default; diff --git a/dist/options/index.js b/dist/options/index.js deleted file mode 100644 index d6bd2c6..0000000 --- a/dist/options/index.js +++ /dev/null @@ -1 +0,0 @@ -import i from"files-pipe/dist/lib/deepmerge.js";import s from"files-pipe/dist/options/index.js";import t from"./critters.js";var l=i(s,{critters:t,pipe:{failed:async e=>`Error: Cannot inline file ${e.inputPath}!`,fulfilled:async e=>e.files>0?`Successfully inlined a total of ${e.files} HTML ${e.files===1?"file":"files"}.`:!1,accomplished:!1}});export{l as default};