You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/content/docs/create-a-registry.mdx
+106-1Lines changed: 106 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,6 +147,8 @@ Now that we have a working registry we can deploy it to wherever we want. Take a
147
147
148
148
Each provider has a guide on how to deploy your registry to that particular platform.
149
149
150
+
This is the end of the basic guide. You can now start adding items to your registry and deploying it to your favorite hosting platform.
151
+
150
152
## Advanced Usage
151
153
152
154
Now that we have covered the basics of creating a registry we can start to explore some of the features that make **jsrepo** so powerful.
@@ -271,4 +273,107 @@ Environment variables will be added to the users `.env.local` or `.env` file.
271
273
272
274
If you leave an environment variable blank the user will be prompted to add a value for it.
273
275
274
-
Values you configure here will ***never*** overwrite existing values in the user's env file.
276
+
Values you configure here will ***never*** overwrite existing values in the user's env file.
277
+
278
+
### Distributing multiple registries
279
+
280
+
It's become common to distribute multiple registries to allow users to optionally use different variants of your registry for example JavaScript or TypeScript.
281
+
282
+
However until now there wasn't an easy way to do this.
283
+
284
+
**jsrepo** solves this by allowing you to define multiple registries in the same config:
285
+
286
+
```ts title="jsrepo.config.mts"
287
+
import { defineConfig } from"jsrepo";
288
+
289
+
exportdefaultdefineConfig({
290
+
registry: [
291
+
{
292
+
name: '@my-registry/typescript',
293
+
// ...
294
+
},
295
+
{
296
+
name: '@my-registry/javascript',
297
+
// ...
298
+
}
299
+
]
300
+
});
301
+
```
302
+
303
+
You can then use the `outputs` api to define where each registry should be output to:
0 commit comments