turbo-sveltekit-shadcn Svelte Themes

Turbo Sveltekit Shadcn

Turborepo sveltekit starter with shadcn pre-configured

Turborepo Svelte starter

This is an unofficial starter Turborepo.

Using this example

Run the following command:

bunx create-turbo@latest -e https://github.com/IslamZaoui/turbo-sveltekit-shadcn

What's inside?

This Turborepo includes the following packages/apps:

Apps and Packages

Each package/app is 100% TypeScript.

Utilities

This Turborepo has some additional tools already setup for you:

Adding components

You can add components to the project by running the following command:

bun ui add <component-name>

# Example:
bun ui add button input

When adding a new component, make sure to update the dependencies correctly:

  • Dependencies required by the ui package should go in devDependencies.
  • Dependencies needed by the consuming app should be listed in peerDependencies of the ui package.
  • Prefer using catalogs in package.json whenever possible.

Migrating from bun to other package managers (pnpm for example)

  • Remove bun.lock file from the root of the project.
  • Create pnpm-workspace.yaml in the root of the project with the following content:
packages:
  - 'apps/*'
  - 'packages/*'

catalog:
    "typescript": "^6",
  ...and more (check the workspace field in `package.json` file)
  • Remove workspace field from the package.json file.
  • Update any script that uses bun to use pnpm instead. For example:
- "ui": "bun --cwd packages/ui ui"
+ "ui": "pnpm --filter @repo/ui ui"
  • Replace bun-types and other bun related stuff with node

And you should be good to go!

Top categories

Loading Svelte Themes