@jsrepo/shadcn-svelte
v0.0.3
Published
A package to help you distribute your jsrepo registry as a shadcn-svelte registry.
Maintainers
Readme
@jsrepo/shadcn-svelte
A package to help you distribute your jsrepo registry as a shadcn-svelte registry.
Usage
Install the package:
pnpm install @jsrepo/shadcn-svelte -DUse the output to output a shadcn-svelte registry:
import { defineConfig } from "jsrepo";
import { output } from "@jsrepo/shadcn-svelte/output";
export default defineConfig({
registry: {
// ...
outputs: [
output({
dir: "./public/r",
// should match how your registry's code imports other registry code
aliases: {
lib: "$lib",
ui: "$lib/components/ui",
components: "$lib/components",
utils: "$lib/utils",
hooks: "$lib/hooks",
},
}),
],
},
});If you want to ensure compatibility with the shadcn registry while losing access to some of the features of the jsrepo registry you can use the defineShadcnSvelteRegistry function. This can also be useful for incremental adoption as it closely matches the shadcn registry schema.
import { defineShadcnSvelteRegistry, output } from "@jsrepo/shadcn-svelte";
export default defineConfig({
registry: defineShadcnSvelteRegistry({
// ...
// make sure you still include the output
outputs: [output({ dir: "./public/r" })],
}),
});