@powerlines/plugin-satori 0.1.676 → 0.1.678
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.
- package/README.md +29 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -74,6 +74,35 @@ A Powerlines plugin to use [satori](https://github.com/vercel/satori) to generat
|
|
|
74
74
|
|
|
75
75
|
<!-- END doctoc -->
|
|
76
76
|
|
|
77
|
+
## Features
|
|
78
|
+
|
|
79
|
+
- Generates SVG images from JSX/TSX components with [Satori](https://github.com/vercel/satori)
|
|
80
|
+
- Resolves component files from a `path` glob through the `configResolved` hook
|
|
81
|
+
- Writes output next to each component file by default, or to a shared `outputPath`
|
|
82
|
+
- Supports shared `defaultOptions` (such as width and height) with per-component overrides
|
|
83
|
+
- Runs during the `prepare` command
|
|
84
|
+
|
|
85
|
+
## Usage
|
|
86
|
+
|
|
87
|
+
Install the plugin:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
pnpm add @powerlines/plugin-satori
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Register it in `powerlines.config.ts`, pointing `path` at files with a Satori component default export:
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
import { plugin as satori } from "@powerlines/plugin-satori";
|
|
97
|
+
import { defineConfig } from "powerlines/config";
|
|
98
|
+
|
|
99
|
+
export default defineConfig({
|
|
100
|
+
plugins: [satori({ path: "src/og/**/*.tsx" })]
|
|
101
|
+
});
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Run the `prepare` command to generate the output images.
|
|
105
|
+
|
|
77
106
|
## Installing
|
|
78
107
|
|
|
79
108
|
Using [pnpm](http://pnpm.io):
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-satori",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.678",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to use Satori to generate SVG files from jsx/tsx components.",
|
|
6
6
|
"repository": {
|
|
@@ -117,12 +117,12 @@
|
|
|
117
117
|
"@stryke/types": "^0.12.44",
|
|
118
118
|
"defu": "^6.1.7",
|
|
119
119
|
"jiti": "^2.7.0",
|
|
120
|
-
"powerlines": "^0.47.
|
|
120
|
+
"powerlines": "^0.47.217",
|
|
121
121
|
"satori": "^0.18.4"
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
125
|
-
"@storm-software/config": "^1.138.
|
|
124
|
+
"@powerlines/plugin-plugin": "^0.12.630",
|
|
125
|
+
"@storm-software/config": "^1.138.90",
|
|
126
126
|
"@types/node": "^25.9.9",
|
|
127
127
|
"@types/react": "^19.3.0",
|
|
128
128
|
"@types/react-dom": "^19.3.0",
|
|
@@ -131,5 +131,5 @@
|
|
|
131
131
|
},
|
|
132
132
|
"publishConfig": { "access": "public" },
|
|
133
133
|
"types": "./dist/index.d.cts",
|
|
134
|
-
"gitHead": "
|
|
134
|
+
"gitHead": "bb4e1f2b32a8bb9d20559ca7c3df3a2f30a0d14e"
|
|
135
135
|
}
|