@powerlines/plugin-content-collections 0.1.677 → 0.1.679
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 +35 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -74,6 +74,41 @@ A Powerlines plugin to generate project code using [content-collections](https:/
|
|
|
74
74
|
|
|
75
75
|
<!-- END doctoc -->
|
|
76
76
|
|
|
77
|
+
## Features
|
|
78
|
+
|
|
79
|
+
- Generates project code with Content Collections, built during `prepare`
|
|
80
|
+
- Reads the collections config, checksums it, and builds with a Powerlines-backed writer
|
|
81
|
+
- Build-event subscription via context (`contentCollections.context`, `.build()`, `.on`)
|
|
82
|
+
- Emitter and writer factories under `./helpers/create-emitter` and `./helpers/create-writer`
|
|
83
|
+
|
|
84
|
+
## Usage
|
|
85
|
+
|
|
86
|
+
Install the plugin:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pnpm add @powerlines/plugin-content-collections
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Register it in `powerlines.config.ts`:
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
import { defineConfig } from "powerlines";
|
|
96
|
+
import { plugin as contentCollections } from "@powerlines/plugin-content-collections";
|
|
97
|
+
|
|
98
|
+
export default defineConfig({
|
|
99
|
+
plugins: [
|
|
100
|
+
contentCollections({
|
|
101
|
+
configFile: "{root}/content-collections.ts",
|
|
102
|
+
collections: []
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
});
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Requires peer `@content-collections/core >= 0.12.3`, installed by the consumer.
|
|
109
|
+
|
|
110
|
+
Run the Powerlines build for your project to activate the plugin.
|
|
111
|
+
|
|
77
112
|
## Installing
|
|
78
113
|
|
|
79
114
|
Using [pnpm](http://pnpm.io):
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-content-collections",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.679",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Powerlines plugin to generate project code using Content Collections.",
|
|
6
6
|
"keywords": [
|
|
@@ -145,11 +145,11 @@
|
|
|
145
145
|
"@stryke/types": "^0.12.44",
|
|
146
146
|
"defu": "^6.1.7",
|
|
147
147
|
"pluralize": "^8.0.0",
|
|
148
|
-
"powerlines": "^0.47.
|
|
148
|
+
"powerlines": "^0.47.217"
|
|
149
149
|
},
|
|
150
150
|
"devDependencies": {
|
|
151
151
|
"@content-collections/core": "^0.12.0",
|
|
152
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
152
|
+
"@powerlines/plugin-plugin": "^0.12.630",
|
|
153
153
|
"@types/node": "^25.9.9",
|
|
154
154
|
"@types/pluralize": "^0.0.33"
|
|
155
155
|
},
|
|
@@ -158,5 +158,5 @@
|
|
|
158
158
|
"@content-collections/core": { "optional": false }
|
|
159
159
|
},
|
|
160
160
|
"publishConfig": { "access": "public" },
|
|
161
|
-
"gitHead": "
|
|
161
|
+
"gitHead": "bb4e1f2b32a8bb9d20559ca7c3df3a2f30a0d14e"
|
|
162
162
|
}
|