@gjsify/rolldown-plugin-deepkit 0.4.42 → 0.4.44
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 +38 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @gjsify/rolldown-plugin-deepkit
|
|
2
|
+
|
|
3
|
+
A Rolldown (and Rollup/Vite-compatible) plugin that runs the Deepkit TypeScript runtime-reflection transform (`@deepkit/type-compiler`) during gjsify builds. Opt-in only — disabled by default to avoid transforming projects that do not use Deepkit runtime types.
|
|
4
|
+
|
|
5
|
+
Part of the [gjsify](https://github.com/gjsify/gjsify) project — Node.js and Web APIs for GJS (GNOME JavaScript).
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
gjsify install @gjsify/rolldown-plugin-deepkit
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
Enable via `.gjsifyrc.js` in your project (the gjsify CLI picks this up automatically):
|
|
16
|
+
|
|
17
|
+
```javascript
|
|
18
|
+
// .gjsifyrc.js
|
|
19
|
+
export default {
|
|
20
|
+
typescript: { reflection: true },
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Or use the plugin directly in a Rolldown / Vite config:
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import { deepkitPlugin } from '@gjsify/rolldown-plugin-deepkit';
|
|
28
|
+
|
|
29
|
+
export default {
|
|
30
|
+
plugins: [deepkitPlugin({ reflection: true })],
|
|
31
|
+
};
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Keep `reflection: false` (the default) unless your project explicitly uses `@deepkit/type` runtime types — the transform rewrites TypeScript in a way that can break non-Deepkit code.
|
|
35
|
+
|
|
36
|
+
## License
|
|
37
|
+
|
|
38
|
+
MIT
|