这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/site/components/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function Tabs({
);
}

const packageManagers = ["pnpm", "yarn", "npm", "bun (Beta)"];
const packageManagers = ["pnpm", "yarn", "npm", "bun"];

const checkPackageManagerIndex = (index: number, provided: string) => {
if (provided !== packageManagers[index]) {
Expand Down
330 changes: 330 additions & 0 deletions docs/site/content/blog/turbo-2-6.mdx

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Internal Packages are used in your repository by installing them in `package.jso
```
</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">
```json title="./apps/web/package.json"
{
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion docs/site/content/docs/core-concepts/remote-caching.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ npx turbo login

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```bash title="Terminal"
bunx turbo login
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ npm run build

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```bash title="Terminal"
bun run build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ You'll need a directory to put the package in. Let's create one at `./packages/m
Next, create the `package.json` for the package. By adding this file, you'll fulfill [the two requirements for an Internal Package](/docs/crafting-your-repository/structuring-a-repository#specifying-packages-in-a-monorepo), making it discoverable to Turborepo and the rest of your Workspace.

<Callout type="warn">
The `name` field in your `package.json` determines how your package can be imported throughout your workspace. The name you choose here (e.g. `@repo/math`) is exactly how other packages will import it (e.g. `import { add } from '@repo/math/add'`).
The `name` field in your `package.json` determines how your package can be
imported throughout your workspace. The name you choose here (e.g.
`@repo/math`) is exactly how other packages will import it (e.g. `import {add}
from '@repo/math/add'`).
</Callout>

<PackageManagerTabs>
Expand Down Expand Up @@ -132,7 +135,7 @@ The `name` field in your `package.json` determines how your package can be impor

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">
```json title="./packages/math/package.json"
{
"name": "@repo/math",
Expand Down Expand Up @@ -271,7 +274,7 @@ You're ready to use your new package in an application. Let's add it to the `web
```
</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">
```diff title="apps/web/package.json"
"dependencies": {
+ "@repo/math": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { LinkToDocumentation } from '#components/link-to-documentation';
```
</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">
```json title="./apps/web/package.json"
{
"dependencies": {
Expand Down Expand Up @@ -113,7 +113,7 @@ npm install jest --workspace=web --workspace=@repo/ui --save-dev
<LinkToDocumentation href="https://docs.npmjs.com/cli/v7/using-npm/config#workspace">npm documentation</LinkToDocumentation>
</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```bash title="Terminal"
bun install jest --filter=web --filter=@repo/ui --dev
Expand Down Expand Up @@ -214,7 +214,7 @@ npm install typescript@latest --workspaces

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">
No equivalent

<small>[→ Bun documentation](https://bun.sh/docs/install/workspaces)</small>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ npm run dev

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```bash title="Terminal"
bun run dev
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ npx create-turbo@latest

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">
```bash title="Terminal"
bunx create-turbo@latest
```
Expand Down Expand Up @@ -128,7 +128,7 @@ Below, the structural elements of `create-turbo` that make it a valid workspace
</Files>
</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">
<Files>
<File name="package.json" green />
<File name="bun.lock" green />
Expand Down Expand Up @@ -206,7 +206,7 @@ First, your package manager needs to describe the locations of your packages. We
<LinkToDocumentation href="https://docs.npmjs.com/cli/v7/using-npm/workspaces#defining-workspaces">npm workspace documentation</LinkToDocumentation>
</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">
```json title="./package.json"
{
"workspaces": [
Expand Down Expand Up @@ -305,7 +305,7 @@ The root `package.json` is the base for your workspace. Below is a common exampl

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```json title="./package.json"
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ npx @turbo/codemod migrate

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```bash title="Terminal"
bunx @turbo/codemod migrate
Expand Down Expand Up @@ -103,7 +103,7 @@ Turborepo 2.0 requires that your Workspace define this field as a way to improve

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```diff title="./package.json"
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ We recommend you install `turbo` both globally and into your repository's root f
```

</Tab>
<Tab value="bun (Beta)">
<Tab value="bun">

```bash title="Terminal"
# Global install
Expand Down Expand Up @@ -227,7 +227,7 @@ Turborepo optimizes your repository using information from your package manager.

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```diff title="package.json"
{
Expand Down Expand Up @@ -297,7 +297,7 @@ The `workspaces` field tells your package manager which directories contain your
<LinkToDocumentation href="https://docs.npmjs.com/cli/v7/using-npm/workspaces#defining-workspaces">npm workspace documentation</LinkToDocumentation>
</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">
```json title="./package.json"
{
"workspaces": [
Expand Down
2 changes: 1 addition & 1 deletion docs/site/content/docs/getting-started/examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ npx create-turbo@latest --example [github-url]

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```bash title="Terminal"
# Use an example listed below
Expand Down
6 changes: 3 additions & 3 deletions docs/site/content/docs/getting-started/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ npx create-turbo@latest

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">
```bash title="Terminal"
bunx create-turbo@latest
```
Expand Down Expand Up @@ -78,7 +78,7 @@ A global install of `turbo` brings flexibility and speed to your local workflows

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">
```bash title="Terminal"
bun install turbo --global
```
Expand Down Expand Up @@ -137,7 +137,7 @@ When collaborating with other developers in a repository, it's a good idea to pi

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">
```bash title="Terminal"
bun install turbo --dev
```
Expand Down
2 changes: 1 addition & 1 deletion docs/site/content/docs/guides/ci-vendors/buildkite.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Create a file called `.buildkite/pipeline.yml` in your repository with the follo
</Tab>
<Tab value="bun (Beta)">
<Tab value="bun">
```yaml title=".buildkite/pipeline.yml"
steps:
Expand Down
4 changes: 2 additions & 2 deletions docs/site/content/docs/guides/ci-vendors/circleci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Create a file called `.circleci/config.yml` in your repository with the followin

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```yaml title=".circleci/config.yml"
version: 2.1
Expand Down Expand Up @@ -197,6 +197,6 @@ Copy the value to a safe place. You'll need it in a moment.
![CircleCI Environment Variables](/images/docs/circleci-environment-variables.png)
![CircleCI Create Environment Variables](/images/docs/circleci-create-environment-variables.png)

3. Make a second secret called `TURBO_TEAM` and set it to your team slug - the part after `vercel.com/` in [your Team URL](https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fsettings&title=Find+Team+URL). For example, the slug for `vercel.com/acme` is `acme`.
3. Make a second secret called `TURBO_TEAM` and set it to your team slug - the part after `vercel.com/` in [your Team URL](https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fsettings&title=Find+Team+URL). For example, the slug for `vercel.com/acme` is `acme`.

4. CircleCI automatically loads environment variables stored in project settings into the CI environment. No modifications are necessary for the CI file.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ Create a file called `.github/workflows/ci.yml` in your repository with the foll

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">
```yaml title=".github/workflows/ci.yml"
name: CI

Expand Down
4 changes: 2 additions & 2 deletions docs/site/content/docs/guides/ci-vendors/gitlab-ci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Create a file called `.gitlab-ci.yml` in your repository with the following cont

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">
```yaml title=".gitlab-ci.yml"
default:
image: oven/bun:1.2
Expand Down Expand Up @@ -149,6 +149,6 @@ Copy the value to a safe place. You'll need it in a moment.
![GitLab CI Variables](/images/docs/gitlab-ci-variables.png)
![GitLab CI Create Variable](/images/docs/gitlab-ci-create-variable.png)

3. Make a second secret called `TURBO_TEAM` and set it to your team slug - the part after `vercel.com/` in [your Team URL](https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fsettings&title=Find+Team+URL). For example, the slug for `vercel.com/acme` is `acme`.
3. Make a second secret called `TURBO_TEAM` and set it to your team slug - the part after `vercel.com/` in [your Team URL](https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fsettings&title=Find+Team+URL). For example, the slug for `vercel.com/acme` is `acme`.

Remote Caching will now be operational in your GitLab workflows.
4 changes: 2 additions & 2 deletions docs/site/content/docs/guides/ci-vendors/travis-ci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Create a file called `.travis.yml` in your repository with the following content

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```yaml title=".travis.yml"
language: node_js
Expand Down Expand Up @@ -141,6 +141,6 @@ Copy the value to a safe place. You'll need it in a moment.

![Travis CI Variables](/images/docs/travis-ci-environment-variables.png)

3. Make a second secret called `TURBO_TEAM` and set it to your team slug - the part after `vercel.com/` in [your Team URL](https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fsettings&title=Find+Team+URL). For example, the slug for `vercel.com/acme` is `acme`.
3. Make a second secret called `TURBO_TEAM` and set it to your team slug - the part after `vercel.com/` in [your Team URL](https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fsettings&title=Find+Team+URL). For example, the slug for `vercel.com/acme` is `acme`.

4. Travis CI automatically loads environment variables stored in project settings into the CI environment. No modifications are necessary for the CI file.
6 changes: 3 additions & 3 deletions docs/site/content/docs/guides/frameworks/nextjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ npx create-turbo@latest

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```bash title="Terminal"
bunx create-turbo@latest
Expand Down Expand Up @@ -77,7 +77,7 @@ npx create-next-app@latest apps/my-app

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```bash title="Terminal"
bunx create-next-app@latest apps/my-app
Expand Down Expand Up @@ -131,7 +131,7 @@ To add [Internal Packages](/docs/core-concepts/internal-packages) to your new ap

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```diff title="./apps/my-app/package.json"
{
Expand Down
6 changes: 3 additions & 3 deletions docs/site/content/docs/guides/frameworks/nuxt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ npx create-turbo@latest -e with-vue-nuxt

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```bash title="Terminal"
bunx create-turbo@latest -e with-vue-nuxt
Expand Down Expand Up @@ -77,7 +77,7 @@ npx nuxi@latest init apps/my-app

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```bash title="Terminal"
bunx nuxi@latest init apps/my-app
Expand Down Expand Up @@ -131,7 +131,7 @@ To add [Internal Packages](/docs/core-concepts/internal-packages) to your new ap

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```diff title="./apps/my-app/package.json"
{
Expand Down
6 changes: 3 additions & 3 deletions docs/site/content/docs/guides/frameworks/sveltekit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ npx create-turbo@latest -e with-svelte

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```bash title="Terminal"
bunx create-turbo@latest -e with-svelte
Expand Down Expand Up @@ -77,7 +77,7 @@ npx sv create

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```bash title="Terminal"
bunx sv create
Expand Down Expand Up @@ -131,7 +131,7 @@ To add [Internal Packages](/docs/core-concepts/internal-packages) to your new ap

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```diff title="./apps/my-app/package.json"
{
Expand Down
6 changes: 3 additions & 3 deletions docs/site/content/docs/guides/frameworks/vite.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ npx create-turbo@latest -e with-vite

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```bash title="Terminal"
bunx create-turbo@latest -e with-vite
Expand Down Expand Up @@ -77,7 +77,7 @@ npm create vite@latest apps/my-app

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```bash title="Terminal"
bun create vite@latest apps/my-app
Expand Down Expand Up @@ -131,7 +131,7 @@ To add [Internal Packages](/docs/core-concepts/internal-packages) to your new ap

</Tab>

<Tab value="bun (Beta)">
<Tab value="bun">

```diff title="./apps/my-app/package.json"
{
Expand Down
Loading
Loading