Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Jan 9, 2025
1 parent 97c7795 commit 851ed35
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,27 @@ the prompts:
Using NPM:

```sh
npx astro add astro-compress
npx astro add @playform/compress
```

Using Yarn:

```sh
yarn astro add astro-compress
yarn astro add @playform/compress
```

Using PNPM:

```sh
pnpx astro add astro-compress
pnpx astro add @playform/compress
```

### Install dependencies manually

First, install the `Compress` integration like so:

```sh
npm install -D -E astro-compress
npm install -D -E @playform/compress
```

Then, apply this integration to your `astro.config.*` file using the
Expand All @@ -75,7 +75,7 @@ Then, apply this integration to your `astro.config.*` file using the

```ts
export default {
integrations: [(await import("astro-compress")).default()],
integrations: [(await import("@playform/compress")).default()],
};
```

Expand Down Expand Up @@ -124,7 +124,7 @@ You can override any of the default options from the configurations of:
```ts
export default {
integrations: [
(await import("astro-compress")).default({
(await import("@playform/compress")).default({
CSS: false,
HTML: {
"html-minifier-terser": {
Expand All @@ -146,7 +146,7 @@ or disable them entirely:
```ts
export default {
integrations: [
(await import("astro-compress")).default({
(await import("@playform/compress")).default({
CSS: false,
HTML: false,
Image: false,
Expand All @@ -169,7 +169,7 @@ it to compress a different directory you would have to add it to the `Compress`
```ts
export default {
integrations: [
(await import("astro-compress")).default({
(await import("@playform/compress")).default({
Path: ["./dist", "./Compress"],
}),
],
Expand All @@ -186,7 +186,7 @@ variable.
```ts
export default {
integrations: [
(await import("astro-compress")).default({
(await import("@playform/compress")).default({
Path: ["./Target", "./Build"],
}),
],
Expand All @@ -202,7 +202,7 @@ You can also provide a map of paths for different input output directories.
```ts
export default {
integrations: [
(await import("astro-compress")).default({
(await import("@playform/compress")).default({
Path: new Map([["./Source", "./Target"]]),
}),
],
Expand All @@ -216,7 +216,7 @@ Or an array of the two:
```ts
export default {
integrations: [
(await import("astro-compress")).default({
(await import("@playform/compress")).default({
Path: [
// Compress Target
"./Target",
Expand All @@ -239,7 +239,7 @@ match on file names:
```ts
export default {
integrations: [
(await import("astro-compress")).default({
(await import("@playform/compress")).default({
Exclude: [
"File.png",
(File: string) =>
Expand All @@ -260,14 +260,14 @@ value is `2`, but you can set it to `0` if you don't want to see debug messages:
```ts
export default {
integrations: [
(await import("astro-compress")).default({
(await import("@playform/compress")).default({
Logger: 0,
}),
],
};
```

[Compress]: HTTPS://NPMJS.Org/astro-compress
[Compress]: HTTPS://NPMJS.Org/@playform/compress
[csso]: HTTPS://NPMJS.Org/csso
[lightningcss]: HTTPS://NPMJS.Org/lightningcss
[html-minifier-terser]: HTTPS://NPMJS.Org/html-minifier-terser
Expand Down
2 changes: 1 addition & 1 deletion Source/Function/Integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default ((...[_Option = {}]) => {
}

return {
name: "astro-compress",
name: "@playform/compress",
hooks: {
"astro:config:done": async ({
config: {
Expand Down
2 changes: 1 addition & 1 deletion Target/Function/Integration.js

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

0 comments on commit 851ed35

Please sign in to comment.