Skip to content

Commit

Permalink
AstroCompress/v2.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Oct 8, 2024
1 parent 1267d3c commit f181f0a
Show file tree
Hide file tree
Showing 81 changed files with 305 additions and 181 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/Node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ permissions:
on:
workflow_dispatch:
push:
branches: [Current]
branches: [Alternative]
pull_request:
branches: [Current]
branches: [Alternative]
workflow_call:

jobs:
Expand Down
72 changes: 67 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## 0.1.4
## 2.3.3

### Fixed

- Fixes missing `Pipe.js`

## 0.1.2
## 2.3.2

### Added

Expand Down Expand Up @@ -50,7 +50,7 @@
- Fixed alignment and spacing issues in README table
- Fixed incorrect package name in dependency badges

## 0.1.1
## 2.3.1

### Changed

Expand All @@ -63,7 +63,63 @@
- Improved code formatting in Source/Function/Image/Writesharp.ts:
- Simplified import statement for default sharp options

## 0.1.0
## 2.3.0

### Changed

- Updated TODO comments in Integration.ts and Middleware.ts

## 2.2.28

### Changed

- Updated lightningcss interface and options

## 2.2.27

### Changed

- Reordered CSS processing in Integration.ts (lightningcss now runs before
csso)

## 2.2.26

### Changed

- Minor formatting changes and comma additions

## 2.2.25

No changes recorded in this version.

## 2.2.24

### Changed

- Updated sharp configuration in Integration.ts
- Removed Merge.ts interface

## 2.2.23

### Changed

- Updated CSS processing in Integration.ts to support both csso and
lightningcss
- Minor updates to sharp configuration and error handling

## 2.2.22

### Changed

- Updated import paths to use @ prefix
- Renamed some Type interfaces to Interface
- Updated sharp configuration and processing
- Added support for lightningcss
- Updated various option configurations

## 2.2.21

This version marks the beginning of the recorded changes.

### Added

Expand Down Expand Up @@ -220,4 +276,10 @@

### Added

- Initial release
- # Initial release
- Initial setup of AstroCompress integration
- Implemented various compression functions for CSS, HTML, JavaScript, Images,
and SVG
- Added configuration options for different file types
- Set up basic project structure with separate files for different
functionalities
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 @playform/compress
npx astro add astro-compress
```

Using Yarn:

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

Using PNPM:

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

### Install dependencies manually

First, install the `Compress` integration like so:

```sh
npm install -D -E @playform/compress
npm install -D -E astro-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("@playform/compress")).default()],
integrations: [(await import("astro-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("@playform/compress")).default({
(await import("astro-compress")).default({
CSS: false,
HTML: {
"html-minifier-terser": {
Expand All @@ -146,7 +146,7 @@ or disable them entirely:
```ts
export default {
integrations: [
(await import("@playform/compress")).default({
(await import("astro-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("@playform/compress")).default({
(await import("astro-compress")).default({
Path: ["./dist", "./Compress"],
}),
],
Expand All @@ -186,7 +186,7 @@ variable.
```ts
export default {
integrations: [
(await import("@playform/compress")).default({
(await import("astro-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("@playform/compress")).default({
(await import("astro-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("@playform/compress")).default({
(await import("astro-compress")).default({
Path: [
// Compress Target
"./Target",
Expand All @@ -239,7 +239,7 @@ match on file names:
```ts
export default {
integrations: [
(await import("@playform/compress")).default({
(await import("astro-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("@playform/compress")).default({
(await import("astro-compress")).default({
Logger: 0,
}),
],
};
```

[Compress]: HTTPS://NPMJS.Org/@playform/compress
[Compress]: HTTPS://NPMJS.Org/astro-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 @@ -53,7 +53,7 @@ export default ((...[_Option = {}]: Parameters<Interface>) => {
}

return {
name: "@playform/compress",
name: "astro-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.

Loading

0 comments on commit f181f0a

Please sign in to comment.