Skip to content

Commit

Permalink
CompressAstro/v0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Mar 31, 2024
1 parent b14ceaa commit 24dae21
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 28 deletions.
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
## 0.0.2

- Cleanup

## 0.0.1

- Initial version
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,27 @@ follow the prompts:
Using NPM:

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

Using Yarn:

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

Using PNPM:

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

### Install dependencies manually

First, install the `CompressAstro` integration like so:

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

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

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

## Getting started
Expand Down Expand Up @@ -114,7 +114,7 @@ or disable them entirely:
```ts
export default {
integrations: [
(await import("compress-astro")).default({
(await import("@playform/compress-astro")).default({
CSS: false,
HTML: false,
Image: false,
Expand All @@ -137,7 +137,7 @@ like it to compress a different directory you would have to add it to the
```ts
export default {
integrations: [
(await import("compress-astro")).default({
(await import("@playform/compress-astro")).default({
Path: ["./dist", "./Compress"],
}),
],
Expand All @@ -154,7 +154,7 @@ variable.
```ts
export default {
integrations: [
(await import("compress-astro")).default({
(await import("@playform/compress-astro")).default({
Path: ["./Target", "./Build"],
}),
],
Expand All @@ -170,7 +170,7 @@ You can also provide a map of paths for different input output directories.
```ts
export default {
integrations: [
(await import("compress-astro")).default({
(await import("@playform/compress-astro")).default({
Path: new Map([["./Source", "./Target"]]),
}),
],
Expand All @@ -184,7 +184,7 @@ Or an array of the two:
```ts
export default {
integrations: [
(await import("compress-astro")).default({
(await import("@playform/compress-astro")).default({
Path: [
// Compress Target
"./Target",
Expand All @@ -207,7 +207,7 @@ match on file names:
```ts
export default {
integrations: [
(await import("compress-astro")).default({
(await import("@playform/compress-astro")).default({
Exclude: [
"File.png",
(File: string) =>
Expand All @@ -228,14 +228,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("compress-astro")).default({
(await import("@playform/compress-astro")).default({
Logger: 0,
}),
],
};
```

[CompressAstro]: https://npmjs.org/compress-astro
[CompressAstro]: https://npmjs.org/@playform/compress-astro
[csso]: https://npmjs.org/csso
[html-minifier-terser]: https://npmjs.org/html-minifier-terser
[terser]: https://npmjs.org/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 @@ -47,7 +47,7 @@ export default ((...[_Option = {}]: Parameters<Type>) => {
}

return {
name: "compress-astro",
name: "@playform/compress-astro",
hooks: {
"astro:config:done": async ({
config: {
Expand Down
6 changes: 3 additions & 3 deletions Target/Function/Integration.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ export declare const Default: Omit<{} & {
Passed: ({ Before, Buffer }: import("files-pipe/Target/Interface/File.js").default) => Promise<boolean>;
Accomplished: ({ Input, Before, After }: import("files-pipe/Target/Interface/File.js").default) => Promise<string>;
Changed: (Plan: import("files-pipe/Target/Interface/Plan.js").default) => Promise<any>;
Read: ({ Input }: any) => Promise<string>;
Wrote: ({ Buffer }: any) => Promise<any>;
Fulfilled: ({ File }: any) => Promise<string | false>;
Read: ({ Input }: import("files-pipe/Target/Interface/File.js").default) => Promise<string>;
Wrote: ({ Buffer }: import("files-pipe/Target/Interface/File.js").default) => Promise<import("files-pipe/Target/Type/Buffer.js").Type>;
Fulfilled: ({ File }: import("files-pipe/Target/Interface/Plan.js").default) => Promise<string | false>;
}, "__proto__">;
File: string;
Exclude: false;
Expand Down
4 changes: 2 additions & 2 deletions Target/Function/Integration.js

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

6 changes: 3 additions & 3 deletions Target/Variable/Option.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ declare const _default: Omit<{} & {
Passed: ({ Before, Buffer }: import("files-pipe/Target/Interface/File.js").default) => Promise<boolean>;
Accomplished: ({ Input, Before, After }: import("files-pipe/Target/Interface/File.js").default) => Promise<string>;
Changed: (Plan: import("files-pipe/Target/Interface/Plan.js").default) => Promise<any>;
Read: ({ Input }: any) => Promise<string>;
Wrote: ({ Buffer }: any) => Promise<any>;
Fulfilled: ({ File }: any) => Promise<string | false>;
Read: ({ Input }: import("files-pipe/Target/Interface/File.js").default) => Promise<string>;
Wrote: ({ Buffer }: import("files-pipe/Target/Interface/File.js").default) => Promise<import("files-pipe/Target/Type/Buffer.js").Type>;
Fulfilled: ({ File }: import("files-pipe/Target/Interface/Plan.js").default) => Promise<string | false>;
}, "__proto__">;
File: string;
Exclude: false;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "compress-astro",
"version": "0.0.2",
"name": "@playform/compress-astro",
"version": "0.0.1",
"private": false,
"description": "🗜️ Compress Astro.",
"keywords": [
Expand Down

0 comments on commit 24dae21

Please sign in to comment.