UNPKG

@otterlord/astro-compress

Version:

🗜️ AstroJS compression utilities. Compress HTML, CSS, JavaScript and more!

2 lines (1 loc) 643 B
import i from"../options/index.js";import n from"./files/by.js";import s from"./files/in.js";import e from"./files/not.js";import o from"./files/pipe.js";class p{pipe=async(t=i.pipe)=>await o(this.plan,t);not=async t=>(this.plan.results=await e(t,this.plan.results),this);by=async(t="**/*")=>t?(this.plan.results=await n(t,this.plan.paths,this.plan.results),this):this;in=async(t="./")=>t?(this.plan.paths=await s(t,this.plan.paths),this):this;plan={files:0,debug:2,info:{},paths:new Map,results:new Map,ongoing:{buffer:"",fileSizeAfter:0,fileSizeBefore:0,inputPath:"",outputPath:""}};constructor(t=2){this.plan.debug=t}}export{p as default};