Turborepo
A monorepo is a single repository containing multiple distinct projects, with well-defined relationships. learn more at monorepo.tools
Turborepoenable managing deployable apps and associated Sharing Code in single git repo. Sharing Code cab be either Internal Packages or External Packages
Internal packages are packages which are only intended to be used inside your monorepo. They're extremely useful for sharing code between apps in closed-source monorepos. External packages run their files through a bundler before putting them on a package registry.
What's inside?
This Turborepo includes the following packages/apps:
Apps and Packages
WebApps
playground
: an experimental svelte-kit web app to play with new ideas.docs
: a sample documentation web app build with astro's starlightweb
: a sample landing page web app build with astroconsole
: a sample dashboard web app build with svelte-kit
Packages
ui
: a stub Svelte component library shared by bothweb
anddocs
applicationseslint-config
:eslint
configurations (includeseslint-plugin-svelte
andeslint-config-prettier
)prettier-config
: sharedprettier
configurations (plugins etc...)typescript-config
: sharedtsconfig
filesutils
: utility functions used throughout the monorepo
Utilities
This Turborepo has some additional tools already setup for you:
TypeScript for static type checking
ESLint for code linting
Prettier for code formatting
Prerequisite
Turbo CLI
VS Code monorepo plugin: Monorepo Focus Workspace
Setup
Create sveltekit turborepo
to create a new sveltekit turborepo, Run the following command:
Setup Remote Caching for Turborepo on Vercel
Usage
Environment
App Environment Variables
Turbo is working on first-class solution to load dotEnv files. Meanwhile we recommend using a library called dotenv-run to solve this problem.
turbo automatically include environment variables from .env , .secrets as we set them at globalDotEnv in turbo.json
Run
Test
Build
Maintenance
migrate command which both upgrades your repo to the specified version (latest by default) of turbo, and runs any codemods required.
Docker Build
Guides
Last updated