storyloco 1.0.1 → 1.0.2
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 +9 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -90,12 +90,13 @@ storyloco/
|
|
|
90
90
|
|
|
91
91
|
2. **Export types** in your plugin:
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
93
|
+
Create a `types.ts` file in your plugin package:
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
// packages/your-plugin/types.ts
|
|
97
|
+
export interface YourType {
|
|
98
|
+
// your interface here
|
|
99
|
+
}
|
|
99
100
|
```
|
|
100
101
|
|
|
101
102
|
3. **Add to root exports** in `package.json`:
|
|
@@ -104,7 +105,7 @@ storyloco/
|
|
|
104
105
|
{
|
|
105
106
|
"exports": {
|
|
106
107
|
"./your-plugin": {
|
|
107
|
-
"types": "./packages/your-plugin/
|
|
108
|
+
"types": "./packages/your-plugin/types.ts",
|
|
108
109
|
"import": "./packages/your-plugin/src/app.svelte"
|
|
109
110
|
}
|
|
110
111
|
}
|
|
@@ -113,7 +114,7 @@ storyloco/
|
|
|
113
114
|
|
|
114
115
|
4. **Re-export in `src/index.ts`**:
|
|
115
116
|
```typescript
|
|
116
|
-
export type { YourType } from '../packages/your-plugin/
|
|
117
|
+
export type { YourType } from '../packages/your-plugin/types'
|
|
117
118
|
```
|
|
118
119
|
|
|
119
120
|
## 🎨 Shared Components
|