Skip to content

Commit

Permalink
1.1.28
Browse files Browse the repository at this point in the history
Fixes Version 1.1.27 breaks Astro dev and build #63
  • Loading branch information
NikolaRHristov committed Feb 3, 2023
1 parent aad6e33 commit 1456308
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.28

- Bug fix

## 1.1.27

- Cleanup
Expand Down
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.

1 change: 1 addition & 0 deletions dist/options/critters.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var e={preload:"media",inlineFonts:!0,compress:!0,pruneSource:!0};export{e as default};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "astro-critters",
"version": "1.1.27",
"version": "1.1.28",
"type": "module",
"description": "🦔 AstroJS GoogleChromeLabs critters integration. Inline your critical CSS with Astro.",
"repository": {
Expand All @@ -24,7 +24,7 @@
"performance"
],
"scripts": {
"build": "lightrix build src/index.ts src/options/index.ts"
"build": "lightrix build src/index.ts src/options/*.ts"
},
"dependencies": {
"critters": "0.0.16",
Expand Down
19 changes: 9 additions & 10 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
import type { AstroIntegration } from "astro";

import type {
executions,
optionPath,
} from "files-pipeline/dist/options/index.js";

import type { Options } from "./options/index.js";
// @ts-ignore
import Critters from "critters";

import defaults from "./options/index.js";

import deepmerge from "files-pipeline/dist/lib/deepmerge.js";
import { files } from "files-pipeline";

import { fileURLToPath } from "url";

import applyTo from "files-pipeline/dist/lib/apply-to.js";
import deepmerge from "files-pipeline/dist/lib/deepmerge.js";

import { files } from "files-pipeline";
import type { AstroIntegration } from "astro";

// critters
// @ts-ignore
import Critters from "critters";
import type { Options } from "./options/index.js";

export default (options: Options = {}): AstroIntegration => {
for (const option in options) {
Expand Down Expand Up @@ -80,7 +79,7 @@ export default (options: Options = {}): AstroIntegration => {
return "info";
}
})(),
})
} satisfies Options["critters"])
);

await (
Expand All @@ -92,7 +91,7 @@ export default (options: Options = {}): AstroIntegration => {
).pipeline(
deepmerge(defaults["pipeline"], {
wrote: async (current) =>
critters.process(current.buffer),
critters.process(current.buffer.toString()),
} satisfies executions)
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/options/critters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export default {
inlineFonts: true,
compress: true,
pruneSource: true,
};
} satisfies CRITTERS;

0 comments on commit 1456308

Please sign in to comment.