|
1 | | -# Turborepo starter |
| 1 | +# Sourcemaps |
2 | 2 |
|
3 | | -This Turborepo starter is maintained by the Turborepo core team. |
| 3 | +A monorepo for sourcemap upload infrastructure. |
4 | 4 |
|
5 | | -## Using this example |
| 5 | +## Structure |
6 | 6 |
|
7 | | -Run the following command: |
| 7 | +- **`apps/backend`** — Rust (Axum) API server that ingests sourcemap uploads |
| 8 | +- **`packages/bundler-plugin`** — Universal unplugin adapter set (Vite, Rollup, Rolldown, Webpack, Rspack, esbuild, Unloader, Farm, Bun) that uploads sourcemaps after builds |
8 | 9 |
|
9 | | -```sh |
10 | | -npx create-turbo@latest |
11 | | -``` |
12 | | - |
13 | | -## What's inside? |
14 | | - |
15 | | -This Turborepo includes the following packages/apps: |
16 | | - |
17 | | -### Apps and Packages |
18 | | - |
19 | | -- `docs`: a [Next.js](https://nextjs.org/) app |
20 | | -- `web`: another [Next.js](https://nextjs.org/) app |
21 | | -- `@repo/ui`: a stub React component library shared by both `web` and `docs` applications |
22 | | -- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`) |
23 | | -- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo |
24 | | - |
25 | | -Each package/app is 100% [TypeScript](https://www.typescriptlang.org/). |
26 | | - |
27 | | -### Utilities |
28 | | - |
29 | | -This Turborepo has some additional tools already setup for you: |
30 | | - |
31 | | -- [TypeScript](https://www.typescriptlang.org/) for static type checking |
32 | | -- [ESLint](https://eslint.org/) for code linting |
33 | | -- [Prettier](https://prettier.io) for code formatting |
34 | | - |
35 | | -### Build |
36 | | - |
37 | | -To build all apps and packages, run the following command: |
38 | | - |
39 | | -``` |
40 | | -cd my-turborepo |
41 | | -
|
42 | | -# With [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation) installed (recommended) |
43 | | -turbo build |
44 | | -
|
45 | | -# Without [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation), use your package manager |
46 | | -npx turbo build |
47 | | -yarn dlx turbo build |
48 | | -pnpm exec turbo build |
49 | | -``` |
50 | | - |
51 | | -You can build a specific package by using a [filter](https://turborepo.dev/docs/crafting-your-repository/running-tasks#using-filters): |
52 | | - |
53 | | -``` |
54 | | -# With [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation) installed (recommended) |
55 | | -turbo build --filter=docs |
56 | | -
|
57 | | -# Without [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation), use your package manager |
58 | | -npx turbo build --filter=docs |
59 | | -yarn exec turbo build --filter=docs |
60 | | -pnpm exec turbo build --filter=docs |
61 | | -``` |
62 | | - |
63 | | -### Develop |
64 | | - |
65 | | -To develop all apps and packages, run the following command: |
66 | | - |
67 | | -``` |
68 | | -cd my-turborepo |
69 | | -
|
70 | | -# With [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation) installed (recommended) |
71 | | -turbo dev |
72 | | -
|
73 | | -# Without [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation), use your package manager |
74 | | -npx turbo dev |
75 | | -yarn exec turbo dev |
76 | | -pnpm exec turbo dev |
77 | | -``` |
78 | | - |
79 | | -You can develop a specific package by using a [filter](https://turborepo.dev/docs/crafting-your-repository/running-tasks#using-filters): |
80 | | - |
81 | | -``` |
82 | | -# With [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation) installed (recommended) |
83 | | -turbo dev --filter=web |
84 | | -
|
85 | | -# Without [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation), use your package manager |
86 | | -npx turbo dev --filter=web |
87 | | -yarn exec turbo dev --filter=web |
88 | | -pnpm exec turbo dev --filter=web |
89 | | -``` |
90 | | - |
91 | | -### Remote Caching |
92 | | - |
93 | | -> [!TIP] |
94 | | -> Vercel Remote Cache is free for all plans. Get started today at [vercel.com](https://vercel.com/signup?utm_source=remote-cache-sdk&utm_campaign=free_remote_cache). |
95 | | -
|
96 | | -Turborepo can use a technique known as [Remote Caching](https://turborepo.dev/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines. |
97 | | - |
98 | | -By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup?utm_source=turborepo-examples), then enter the following commands: |
| 10 | +## Development |
99 | 11 |
|
| 12 | +```sh |
| 13 | +bun install # install JS dependencies |
| 14 | +bun run dev # start all packages in dev mode |
| 15 | +bun run build # build all packages |
| 16 | +bun run check-types # type-check all packages |
100 | 17 | ``` |
101 | | -cd my-turborepo |
102 | 18 |
|
103 | | -# With [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation) installed (recommended) |
104 | | -turbo login |
| 19 | +### Backend |
105 | 20 |
|
106 | | -# Without [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation), use your package manager |
107 | | -npx turbo login |
108 | | -yarn exec turbo login |
109 | | -pnpm exec turbo login |
| 21 | +```sh |
| 22 | +cd apps/backend |
| 23 | +cargo run # start the API server on :3000 |
110 | 24 | ``` |
111 | 25 |
|
112 | | -This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview). |
113 | | - |
114 | | -Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo: |
| 26 | +### Bundler plugin tests |
115 | 27 |
|
| 28 | +```sh |
| 29 | +cd packages/bundler-plugin |
| 30 | +bun run test |
116 | 31 | ``` |
117 | | -# With [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation) installed (recommended) |
118 | | -turbo link |
119 | | -
|
120 | | -# Without [global `turbo`](https://turborepo.dev/docs/getting-started/installation#global-installation), use your package manager |
121 | | -npx turbo link |
122 | | -yarn exec turbo link |
123 | | -pnpm exec turbo link |
124 | | -``` |
125 | | - |
126 | | -## Useful Links |
127 | | - |
128 | | -Learn more about the power of Turborepo: |
129 | | - |
130 | | -- [Tasks](https://turborepo.dev/docs/crafting-your-repository/running-tasks) |
131 | | -- [Caching](https://turborepo.dev/docs/crafting-your-repository/caching) |
132 | | -- [Remote Caching](https://turborepo.dev/docs/core-concepts/remote-caching) |
133 | | -- [Filtering](https://turborepo.dev/docs/crafting-your-repository/running-tasks#using-filters) |
134 | | -- [Configuration Options](https://turborepo.dev/docs/reference/configuration) |
135 | | -- [CLI Usage](https://turborepo.dev/docs/reference/command-line-reference) |
0 commit comments