Skip to content

Commit

Permalink
chore: Updated dist build
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Nov 22, 2023
1 parent e8e86cf commit 0474a9d
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 5 deletions.
2 changes: 2 additions & 0 deletions dist/index.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"use strict";var C=Object.create;var s=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var w=(t,i)=>{for(var c in i)s(t,c,{get:i[c],enumerable:!0})},g=(t,i,c,r)=>{if(i&&typeof i=="object"||typeof i=="function")for(let a of d(i))!b.call(t,a)&&a!==c&&s(t,a,{get:()=>i[a],enumerable:!(r=P(i,a))||r.enumerable});return t};var u=(t,i,c)=>(c=t!=null?C(S(t)):{},g(i||!t||!t.__esModule?s(c,"default",{value:t,enumerable:!0}):c,t)),j=t=>g(s({},"__esModule",{value:!0}),t);var N={};w(N,{default:()=>k});module.exports=j(N);var m=u(require("path"),1),x="_critical.min.css",y={inline:!1,extract:!1,width:1200,height:1200,penthouse:{blockJSRequests:!1}};function B(t,i){return{name:"critical",async writeBundle(c,r){let a=[];for(let e of Object.values(r))if(e.type==="asset"&&e.fileName.endsWith(".css")){let l=m.join(c.dir||"",e.fileName);a.push(l)}if(a.length)for(let e of t.criticalPages){let l=t.criticalBase,o=t.criticalUrl+e.uri,f=t.criticalConfig&&t.criticalConfig.inline==!0?e.template+".html":e.template+x,h=Object.assign({css:a},y,{base:l,src:o,target:f},t.criticalConfig),p=(await import("critical")).generate;console.log(`Generating critical CSS from ${o} to ${f}`),await p(h,n=>{n&&console.error(n),i&&i(n)})}}}}var k=B;
//# sourceMappingURL=index.cjs.map
2 changes: 1 addition & 1 deletion dist/index.mjs.map → dist/index.cjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions dist/index.d.cts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Plugin } from 'rollup';

/**
* [Vite.js](https://vitejs.dev/) & [Rollup](https://rollupjs.org/) plugin for generating critical CSS
* that uses the [critical](https://github.com/addyosmani/critical) generator under the hood.
*
* @param {CriticalPluginConfig} pluginConfig - the plugin configuration object
* @param {Function} callback - callback upon completion of the critical CSS generation
* @constructor
*/
declare function PluginCritical(pluginConfig: CriticalPluginConfig, callback?: CriticalPluginCallback): Plugin;

export { PluginCritical as default };
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0474a9d

Please sign in to comment.