@powerlines/plugin-unified 0.1.293 → 0.1.295

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 +40 -0
  2. package/package.json +10 -10
package/README.md CHANGED
@@ -76,6 +76,46 @@ A Powerlines plugin to generate project code with the [Unified](https://unified.
76
76
 
77
77
  <!-- END doctoc -->
78
78
 
79
+ ## Features
80
+
81
+ - Processes content with [Unified](https://unifiedjs.com/) (remark and rehype plugins)
82
+ - Matches files per rule with `include` / `exclude` patterns
83
+ - Builds a Unified `Processor` in each rule's `setup` function
84
+ - Supports optional `transform.pre` and `transform.post` steps around processor output
85
+
86
+ ## Usage
87
+
88
+ Install the plugin:
89
+
90
+ ```bash
91
+ pnpm add @powerlines/plugin-unified
92
+ ```
93
+
94
+ Register it in `powerlines.config.ts` with one rule:
95
+
96
+ ```ts
97
+ import { plugin as unified } from "@powerlines/plugin-unified";
98
+ import { defineConfig } from "powerlines/config";
99
+
100
+ export default defineConfig({
101
+ plugins: [
102
+ unified({
103
+ rules: [
104
+ {
105
+ include: /\.md$/,
106
+ setup: processor => {
107
+ // Add remark or rehype plugins here
108
+ return processor;
109
+ }
110
+ }
111
+ ]
112
+ })
113
+ ]
114
+ });
115
+ ```
116
+
117
+ Each rule matches files with `include` / `exclude` and builds its processor in `setup`.
118
+
79
119
  ## Installing
80
120
 
81
121
  Using [pnpm](http://pnpm.io):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-unified",
3
- "version": "0.1.293",
3
+ "version": "0.1.295",
4
4
  "private": false,
5
5
  "description": "A Powerlines plugin to use the Unified ecosystem to generate content.",
6
6
  "keywords": ["unified", "powerlines", "storm-software", "powerlines-plugin"],
@@ -91,23 +91,23 @@
91
91
  "files": ["dist/**/*"],
92
92
  "dependencies": {
93
93
  "@rollup/pluginutils": "^4.2.1",
94
- "@stryke/fs": "^0.33.118",
95
- "@stryke/path": "^0.29.43",
96
- "@stryke/type-checks": "^0.6.49",
97
- "@stryke/types": "^0.12.44",
94
+ "@stryke/fs": "^0.33.119",
95
+ "@stryke/path": "^0.29.44",
96
+ "@stryke/type-checks": "^0.6.50",
97
+ "@stryke/types": "^0.12.45",
98
98
  "defu": "^6.1.7",
99
- "powerlines": "^0.47.216",
100
- "rollup": "^4.65.0",
99
+ "powerlines": "^0.47.218",
100
+ "rollup": "^4.66.0",
101
101
  "unified": "^11.0.5"
102
102
  },
103
103
  "devDependencies": {
104
- "@powerlines/plugin-plugin": "^0.12.629",
105
- "@types/estree": "^1.0.9",
104
+ "@powerlines/plugin-plugin": "^0.12.631",
105
+ "@types/estree": "^1.0.10",
106
106
  "@types/hast": "^3.0.5",
107
107
  "@types/mdast": "^4.0.4",
108
108
  "@types/node": "^25.9.9",
109
109
  "@types/unist": "^3.0.3"
110
110
  },
111
111
  "publishConfig": { "access": "public" },
112
- "gitHead": "75efa1cc4eb8bc90093202669065576aa70fbfef"
112
+ "gitHead": "c71daefe09bbd0d26190c3096e0a30120d3a244b"
113
113
  }