@powerlines/plugin-image-compression 0.2.626 → 0.2.628

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +34 -0
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -74,6 +74,40 @@ A Powerlines plugin to use [Sharp](https://sharp.pixelplumbing.com) to optimize
74
74
 
75
75
  <!-- END doctoc -->
76
76
 
77
+ ## Features
78
+
79
+ - Optimizes project images through [Sharp](https://sharp.pixelplumbing.com).
80
+ - Re-encodes matching files and writes them to a configured `outputPath`.
81
+ - Emits WebP and AVIF variants via the `webp` and `avif` options.
82
+ - Selects inputs with `filter` globs; no matches means no output and no error.
83
+
84
+ ## Usage
85
+
86
+ Install the package:
87
+
88
+ ```bash
89
+ pnpm add @powerlines/plugin-image-compression
90
+ ```
91
+
92
+ Register the plugin in `powerlines.config.ts`:
93
+
94
+ ```ts
95
+ import { defineConfig } from "powerlines/config";
96
+ import { plugin as imageCompression } from "@powerlines/plugin-image-compression";
97
+
98
+ export default defineConfig({
99
+ plugins: [imageCompression()],
100
+ imageCompression: {
101
+ filter: ["assets/**/*"],
102
+ outputPath: "dist/assets",
103
+ webp: {},
104
+ avif: {}
105
+ }
106
+ });
107
+ ```
108
+
109
+ Then run the Powerlines build for your project.
110
+
77
111
  ## Installing
78
112
 
79
113
  Using [pnpm](http://pnpm.io):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-image-compression",
3
- "version": "0.2.626",
3
+ "version": "0.2.628",
4
4
  "private": false,
5
5
  "description": "A Powerlines plugin to optimize images used by the project.",
6
6
  "keywords": [
@@ -103,15 +103,15 @@
103
103
  "chalk": "5.6.2",
104
104
  "defu": "^6.1.7",
105
105
  "jiti": "^2.7.0",
106
- "powerlines": "^0.47.215",
106
+ "powerlines": "^0.47.217",
107
107
  "sharp": "^0.34.5",
108
108
  "svgo": "^4.1.0"
109
109
  },
110
110
  "devDependencies": {
111
- "@powerlines/plugin-plugin": "^0.12.628",
112
- "@storm-software/config": "^1.138.87",
111
+ "@powerlines/plugin-plugin": "^0.12.630",
112
+ "@storm-software/config": "^1.138.90",
113
113
  "@types/node": "^25.9.9"
114
114
  },
115
115
  "publishConfig": { "access": "public" },
116
- "gitHead": "810bc635d1503594d09d9f0c8c93ea413745a9df"
116
+ "gitHead": "bb4e1f2b32a8bb9d20559ca7c3df3a2f30a0d14e"
117
117
  }