@powerlines/plugin-swc 0.5.687 → 0.5.688

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 +37 -0
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -74,6 +74,43 @@ A Powerlines plugin to transform project code with [SWC](https://swc.rs/).
74
74
 
75
75
  <!-- END doctoc -->
76
76
 
77
+ ## Features
78
+
79
+ - Transforms project code with [SWC](https://swc.rs/)
80
+ - Supplies default SWC transform configuration through the `config` hook
81
+ - Accepts SWC options such as `jsc.target`
82
+
83
+ ## Usage
84
+
85
+ Install the plugin:
86
+
87
+ ```bash
88
+ pnpm add @powerlines/plugin-swc
89
+ ```
90
+
91
+ Register it in `powerlines.config.ts`:
92
+
93
+ ```ts
94
+ import { plugin as swc } from "@powerlines/plugin-swc";
95
+ import { defineConfig } from "powerlines/config";
96
+
97
+ export default defineConfig({
98
+ plugins: [swc()]
99
+ });
100
+ ```
101
+
102
+ The plugin transforms code with SWC once registered. To pass transform options:
103
+
104
+ ```ts
105
+ export default defineConfig({
106
+ plugins: [
107
+ swc({
108
+ jsc: { target: "es2022" }
109
+ })
110
+ ]
111
+ });
112
+ ```
113
+
77
114
  ## Installing
78
115
 
79
116
  Using [pnpm](http://pnpm.io):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-swc",
3
- "version": "0.5.687",
3
+ "version": "0.5.688",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to transform project code with SWC.",
6
6
  "repository": {
@@ -91,13 +91,13 @@
91
91
  "dependencies": {
92
92
  "@swc/core": "^1.16.20",
93
93
  "defu": "^6.1.7",
94
- "powerlines": "^0.47.216"
94
+ "powerlines": "^0.47.217"
95
95
  },
96
96
  "devDependencies": {
97
- "@powerlines/plugin-plugin": "^0.12.629",
97
+ "@powerlines/plugin-plugin": "^0.12.630",
98
98
  "@types/node": "^25.9.9"
99
99
  },
100
100
  "publishConfig": { "access": "public" },
101
101
  "types": "./dist/index.d.cts",
102
- "gitHead": "75efa1cc4eb8bc90093202669065576aa70fbfef"
102
+ "gitHead": "bb4e1f2b32a8bb9d20559ca7c3df3a2f30a0d14e"
103
103
  }