diff --git a/docs/site/components/tabs.tsx b/docs/site/components/tabs.tsx index eb0ffa9420180..5981821a7fc21 100644 --- a/docs/site/components/tabs.tsx +++ b/docs/site/components/tabs.tsx @@ -22,7 +22,7 @@ export function Tabs({ ); } -const packageManagers = ["pnpm", "yarn", "npm"]; +const packageManagers = ["pnpm", "yarn", "npm", "bun (Beta)"]; const checkPackageManagerIndex = (index: number, provided: string) => { if (provided !== packageManagers[index]) { @@ -43,11 +43,11 @@ export function PackageManagerTabs({ throw new Error("Children must be an array."); } - children.forEach((packageManager, index) => { - if (!packageManager.props.value) { - throw new Error(`Package manager tab is missing a value.`); - } + if (packageManagers.length > children.length) { + throw new Error(`Package manager tab is missing a value.`); + } + children.forEach((packageManager, index) => { checkPackageManagerIndex(index, packageManager.props.value); }); diff --git a/docs/site/content/docs/core-concepts/internal-packages.mdx b/docs/site/content/docs/core-concepts/internal-packages.mdx index a87bcad68a3e3..99ab8af40647f 100644 --- a/docs/site/content/docs/core-concepts/internal-packages.mdx +++ b/docs/site/content/docs/core-concepts/internal-packages.mdx @@ -40,6 +40,16 @@ Internal Packages are used in your repository by installing them in `package.jso } ``` + + +```json title="./apps/web/package.json" +{ + "dependencies": { + "@repo/ui": "workspace:*" // [!code highlight] + } +} +``` + In the [Creating an Internal Package guide](/docs/crafting-your-repository/creating-an-internal-package), you can build an Internal Package from the beginning using [the Compiled Package strategy](#compiled-packages). On this page, we'll describe other strategies for creating Internal Packages and their tradeoffs, including [publishing the package to the npm registry](#publishable-packages) to create an External Package. diff --git a/docs/site/content/docs/core-concepts/remote-caching.mdx b/docs/site/content/docs/core-concepts/remote-caching.mdx index 872f868cefd06..b7d4e5a87ef29 100644 --- a/docs/site/content/docs/core-concepts/remote-caching.mdx +++ b/docs/site/content/docs/core-concepts/remote-caching.mdx @@ -112,6 +112,14 @@ yarn dlx turbo login npx turbo login ``` + + + + +```bash title="Terminal" +bunx turbo login +``` + diff --git a/docs/site/content/docs/crafting-your-repository/caching.mdx b/docs/site/content/docs/crafting-your-repository/caching.mdx index 116874fbcdd8a..3b3f062dd6a04 100644 --- a/docs/site/content/docs/crafting-your-repository/caching.mdx +++ b/docs/site/content/docs/crafting-your-repository/caching.mdx @@ -70,6 +70,14 @@ yarn build npm run build ``` + + + + +```bash title="Terminal" +bun run build +``` + diff --git a/docs/site/content/docs/crafting-your-repository/creating-an-internal-package.mdx b/docs/site/content/docs/crafting-your-repository/creating-an-internal-package.mdx index 3d58f50a4cd19..d189f8bc04572 100644 --- a/docs/site/content/docs/crafting-your-repository/creating-an-internal-package.mdx +++ b/docs/site/content/docs/crafting-your-repository/creating-an-internal-package.mdx @@ -124,7 +124,35 @@ Next, create the `package.json` for the package. By adding this file, you'll ful "typescript": "latest" } } -```` +``` + + + + +```json title="./packages/math/package.json" +{ + "name": "@repo/math", + "type": "module", + "scripts": { + "dev": "tsc --watch", + "build": "tsc" + }, + "exports": { + "./add": { + "types": "./src/add.ts", + "default": "./dist/add.js" + }, + "./subtract": { + "types": "./src/subtract.ts", + "default": "./dist/subtract.js" + } + }, + "devDependencies": { + "@repo/typescript-config": "workspace:*", + "typescript": "latest" + } +} +``` @@ -237,6 +265,17 @@ You're ready to use your new package in an application. Let's add it to the `web }, ``` + + +```diff title="apps/web/package.json" + "dependencies": { ++ "@repo/math": "workspace:*", + "next": "latest", + "react": "latest", + "react-dom": "latest" + }, +``` + diff --git a/docs/site/content/docs/crafting-your-repository/managing-dependencies.mdx b/docs/site/content/docs/crafting-your-repository/managing-dependencies.mdx index fffffbca572fe..00b27d37b8935 100644 --- a/docs/site/content/docs/crafting-your-repository/managing-dependencies.mdx +++ b/docs/site/content/docs/crafting-your-repository/managing-dependencies.mdx @@ -44,6 +44,17 @@ import { LinkToDocumentation } from '#/components/link-to-documentation'; } ``` + + +```json title="./apps/web/package.json" +{ + "dependencies": { + "next": "latest", // External dependency + "@repo/ui": "workspace:*" // Internal dependency + } +} +``` + ## Best practices for dependency installation @@ -101,6 +112,15 @@ npm install jest --workspace=web --workspace=@repo/ui --save-dev npm documentation + + + +```bash title="Terminal" +bun install jest --filter=web --filter=@repo/ui --dev +``` + +bun documentation + This practice has several benefits: @@ -190,6 +210,13 @@ npm install typescript@latest --workspaces ``` [→ npm documentation](https://docs.npmjs.com/cli/v7/using-npm/config#workspaces) + + + +No equivalent + +[→ Bun documentation](https://bun.sh/docs/install/workspaces) + diff --git a/docs/site/content/docs/crafting-your-repository/running-tasks.mdx b/docs/site/content/docs/crafting-your-repository/running-tasks.mdx index b51c0cf63fb82..bfaab2ac302c4 100644 --- a/docs/site/content/docs/crafting-your-repository/running-tasks.mdx +++ b/docs/site/content/docs/crafting-your-repository/running-tasks.mdx @@ -60,6 +60,14 @@ yarn dev ```bash title="Terminal" npm run dev +``` + + + + + +```bash title="Terminal" +bun run dev ``` diff --git a/docs/site/content/docs/crafting-your-repository/structuring-a-repository.mdx b/docs/site/content/docs/crafting-your-repository/structuring-a-repository.mdx index 2a0e92578fb3e..f8f2593db18ba 100644 --- a/docs/site/content/docs/crafting-your-repository/structuring-a-repository.mdx +++ b/docs/site/content/docs/crafting-your-repository/structuring-a-repository.mdx @@ -45,6 +45,13 @@ npx create-turbo@latest + +```bash title="Terminal" +bunx create-turbo@latest +``` + + + You can then review the repository for the characteristics described in this guide. @@ -61,6 +68,7 @@ Below, the structural elements of `create-turbo` that make it a valid workspace + @@ -120,6 +128,27 @@ Below, the structural elements of `create-turbo` that make it a valid workspace + + + + + + + + + + + + + + + + + + + + + ### Minimum requirements @@ -176,6 +205,20 @@ First, your package manager needs to describe the locations of your packages. We npm workspace documentation + + + ```json title="./package.json" + { + "workspaces": [ + "apps/*", + "packages/*" + ] + } + ``` + + npm workspace documentation + + Using this configuration, every directory **with a `package.json`** in the `apps` or `packages` directories will be considered a package. @@ -258,6 +301,25 @@ The root `package.json` is the base for your workspace. Below is a common exampl } ``` + + + + +```json title="./package.json" +{ + "private": true, + "scripts": { + "build": "turbo run build", + "dev": "turbo run dev", + "lint": "turbo run lint" + }, + "devDependencies": { + "turbo": "latest" + }, + "packageManager": "bun@1.2.0" +} +``` + diff --git a/docs/site/content/docs/crafting-your-repository/upgrading.mdx b/docs/site/content/docs/crafting-your-repository/upgrading.mdx index 47b794eac9212..eb94d806291e5 100644 --- a/docs/site/content/docs/crafting-your-repository/upgrading.mdx +++ b/docs/site/content/docs/crafting-your-repository/upgrading.mdx @@ -42,6 +42,14 @@ npx @turbo/codemod migrate + + +```bash title="Terminal" +bunx @turbo/codemod migrate +``` + + + This will update your `turbo.json`(s) for many of the breaking changes from 1.x to 2.0. @@ -93,6 +101,16 @@ Turborepo 2.0 requires that your Workspace define this field as a way to improve } ``` + + + + +```diff title="./package.json" +{ ++ "packageManager": "bun@1.2.0" +} +``` + diff --git a/docs/site/content/docs/getting-started/examples.mdx b/docs/site/content/docs/getting-started/examples.mdx index 76cd2a445e381..ba30b8ad851ff 100644 --- a/docs/site/content/docs/getting-started/examples.mdx +++ b/docs/site/content/docs/getting-started/examples.mdx @@ -47,6 +47,18 @@ npx create-turbo@latest --example [github-url] + + +```bash title="Terminal" +# Use an example listed below +bunx create-turbo@latest --example [example-name] + +# Use a GitHub repository from the community +bunx create-turbo@latest --example [github-url] +``` + + + ## Core-maintained examples diff --git a/docs/site/content/docs/getting-started/installation.mdx b/docs/site/content/docs/getting-started/installation.mdx index f08b0c516f4a6..8f992730d46d2 100644 --- a/docs/site/content/docs/getting-started/installation.mdx +++ b/docs/site/content/docs/getting-started/installation.mdx @@ -31,6 +31,13 @@ npx create-turbo@latest + +```bash title="Terminal" +bunx create-turbo@latest +``` + + + The starter repository will have: @@ -71,6 +78,13 @@ A global install of `turbo` brings flexibility and speed to your local workflows + + ```bash title="Terminal" + bun install turbo --global + ``` + + + Once installed globally, you can run your scripts through `turbo` from your terminal, quickly running one-off commands to use within your repository. For example: @@ -123,6 +137,13 @@ When collaborating with other developers in a repository, it's a good idea to pi + + ```bash title="Terminal" + bun install turbo --dev + ``` + + + You can continue to use your global installation of `turbo` to run commands. Global `turbo` will defer to the local version of your repository if it exists. diff --git a/docs/site/content/docs/getting-started/support-policy.mdx b/docs/site/content/docs/getting-started/support-policy.mdx index e45cda08d3416..a64264bb144c7 100644 --- a/docs/site/content/docs/getting-started/support-policy.mdx +++ b/docs/site/content/docs/getting-started/support-policy.mdx @@ -15,7 +15,7 @@ lockfile formats. | pnpm 8+ | Yes | | npm 8+ | Yes | | yarn 1+ | Yes (Includes Yarn Plug'n'Play) | -| bun 1+ | Beta | +| bun 1.2+ | Beta | Package managers have their own release schedules, bugs, and features. While diff --git a/docs/site/content/docs/guides/ci-vendors/circleci.mdx b/docs/site/content/docs/guides/ci-vendors/circleci.mdx index f360e4bb96e06..b8a1901e332d0 100644 --- a/docs/site/content/docs/guides/ci-vendors/circleci.mdx +++ b/docs/site/content/docs/guides/ci-vendors/circleci.mdx @@ -142,6 +142,39 @@ Create a file called `.circleci/config.yml` in your repository with the followin ``` + + + + ```yaml title=".circleci/config.yml" + version: 2.1 + orbs: + node: circleci/node@5.0.2 + workflows: + test: + jobs: + - test + jobs: + test: + docker: + - image: cimg/node:lts + steps: + - checkout + - node/install-packages + - run: + command: npm i -g bun + environment: + TURBO_UI: "false" + - run: + command: bun run build + environment: + TURBO_UI: "false" + - run: + command: bun run test + environment: + TURBO_UI: "false" + ``` + + ## Remote Caching diff --git a/docs/site/content/docs/guides/ci-vendors/github-actions.mdx b/docs/site/content/docs/guides/ci-vendors/github-actions.mdx index 3f90c276f54f4..f1c099b8d0b1d 100644 --- a/docs/site/content/docs/guides/ci-vendors/github-actions.mdx +++ b/docs/site/content/docs/guides/ci-vendors/github-actions.mdx @@ -181,6 +181,52 @@ Create a file called `.github/workflows/ci.yml` in your repository with the foll ``` + + + ```yaml title=".github/workflows/ci.yml" + name: CI + + on: + push: + branches: ["main"] + pull_request: + types: [opened, synchronize] + + jobs: + build: + name: Build and Test + timeout-minutes: 15 + runs-on: ubuntu-latest + # To use Remote Caching, uncomment the next lines and follow the steps below. + # env: + # TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + # TURBO_TEAM: ${{ vars.TURBO_TEAM }} + + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - uses: oven-sh/setup-bun@v2 + + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install dependencies + run: bun install + + - name: Build + run: bun run build + + - name: Test + run: bun run test + ``` + + + ## Remote Caching diff --git a/docs/site/content/docs/guides/ci-vendors/gitlab-ci.mdx b/docs/site/content/docs/guides/ci-vendors/gitlab-ci.mdx index e8062ee2e4a5a..73b5b397e7ef1 100644 --- a/docs/site/content/docs/guides/ci-vendors/gitlab-ci.mdx +++ b/docs/site/content/docs/guides/ci-vendors/gitlab-ci.mdx @@ -104,6 +104,29 @@ Create a file called `.gitlab-ci.yml` in your repository with the following cont + + ```yaml title=".gitlab-ci.yml" + default: + image: oven/bun:1.2 + cache: + key: + files: + - bun.lock + paths: + - node_modules/ + before_script: + - bun install + + build: + script: - bun run build + + test: + script: - bun run test + + ``` + + + ## Remote Caching diff --git a/docs/site/content/docs/guides/ci-vendors/travis-ci.mdx b/docs/site/content/docs/guides/ci-vendors/travis-ci.mdx index b4e0d926742a1..e3cef971ebd3e 100644 --- a/docs/site/content/docs/guides/ci-vendors/travis-ci.mdx +++ b/docs/site/content/docs/guides/ci-vendors/travis-ci.mdx @@ -97,6 +97,28 @@ Create a file called `.travis.yml` in your repository with the following content - npm run test ``` + + + + + ```yaml title=".travis.yml" + language: node_js + node_js: + - lts/* + cache: + npm: false + directories: + - "~/.pnpm-store" + before_install: + - curl -fsSL https://bun.sh/install | bash + install: + - bun install + script: + - bun run build + script: + - bun run test + ``` + diff --git a/docs/site/content/docs/guides/frameworks/nextjs.mdx b/docs/site/content/docs/guides/frameworks/nextjs.mdx index 68a342d63f5b6..665294ed7c02a 100644 --- a/docs/site/content/docs/guides/frameworks/nextjs.mdx +++ b/docs/site/content/docs/guides/frameworks/nextjs.mdx @@ -36,6 +36,14 @@ yarn dlx create-turbo@latest npx create-turbo@latest ``` + + + + +```bash title="Terminal" +bunx create-turbo@latest +``` + @@ -67,6 +75,14 @@ yarn dlx create-next-app@latest apps/my-app npx create-next-app@latest apps/my-app ``` + + + + +```bash title="Terminal" +bunx create-next-app@latest apps/my-app +``` + @@ -113,6 +129,19 @@ To add [Internal Packages](/docs/core-concepts/internal-packages) to your new ap } ``` + + + + +```diff title="./apps/my-app/package.json" +{ + "name": "my-app", + "dependencies": { ++ "@repo/ui": "workspace:*" + } +} +``` + diff --git a/docs/site/content/docs/guides/frameworks/nuxt.mdx b/docs/site/content/docs/guides/frameworks/nuxt.mdx index f5111498ff49b..37bc8c1d24671 100644 --- a/docs/site/content/docs/guides/frameworks/nuxt.mdx +++ b/docs/site/content/docs/guides/frameworks/nuxt.mdx @@ -36,6 +36,14 @@ yarn dlx create-turbo@latest -e with-vue-nuxt npx create-turbo@latest -e with-vue-nuxt ``` + + + + +```bash title="Terminal" +bunx create-turbo@latest -e with-vue-nuxt +``` + @@ -67,6 +75,14 @@ yarn dlx nuxi@latest init apps/my-app npx nuxi@latest init apps/my-app ``` + + + + +```bash title="Terminal" +bunx nuxi@latest init apps/my-app +``` + @@ -113,6 +129,19 @@ To add [Internal Packages](/docs/core-concepts/internal-packages) to your new ap } ``` + + + + +```diff title="./apps/my-app/package.json" +{ + "name": "my-app", + "dependencies": { ++ "@repo/ui": "workspace:*" + } +} +``` + diff --git a/docs/site/content/docs/guides/frameworks/sveltekit.mdx b/docs/site/content/docs/guides/frameworks/sveltekit.mdx index 2369f2cb11080..ae90933fce788 100644 --- a/docs/site/content/docs/guides/frameworks/sveltekit.mdx +++ b/docs/site/content/docs/guides/frameworks/sveltekit.mdx @@ -36,6 +36,14 @@ yarn dlx create-turbo@latest -e with-svelte npx create-turbo@latest -e with-svelte ``` + + + + +```bash title="Terminal" +bunx create-turbo@latest -e with-svelte +``` + @@ -48,7 +56,7 @@ Use [`npm create svelte`](https://kit.svelte.dev/docs/creating-a-project) to set ```bash title="Terminal" -pnpm create svelte@latest apps/my-app +pnpm dlx sv create ``` @@ -56,7 +64,7 @@ pnpm create svelte@latest apps/my-app ```bash title="Terminal" -yarn create svelte@latest apps/my-app +yarn dlx sv create ``` @@ -64,7 +72,15 @@ yarn create svelte@latest apps/my-app ```bash title="Terminal" -npm create svelte@latest apps/my-app +npx sv create +``` + + + + + +```bash title="Terminal" +bunx sv create ``` @@ -113,6 +129,19 @@ To add [Internal Packages](/docs/core-concepts/internal-packages) to your new ap } ``` + + + + +```diff title="./apps/my-app/package.json" +{ + "name": "my-app", + "dependencies": { ++ "@repo/ui": "workspace:*" + } +} +``` + diff --git a/docs/site/content/docs/guides/frameworks/vite.mdx b/docs/site/content/docs/guides/frameworks/vite.mdx index a3cb7317f9023..473a01d9032ef 100644 --- a/docs/site/content/docs/guides/frameworks/vite.mdx +++ b/docs/site/content/docs/guides/frameworks/vite.mdx @@ -36,6 +36,14 @@ yarn dlx create-turbo@latest -e with-vite npx create-turbo@latest -e with-vite ``` + + + + +```bash title="Terminal" +bunx create-turbo@latest -e with-vite +``` + @@ -67,6 +75,14 @@ yarn create vite@latest apps/my-app npm create vite@latest apps/my-app ``` + + + + +```bash title="Terminal" +bun create vite@latest apps/my-app +``` + @@ -113,6 +129,19 @@ To add [Internal Packages](/docs/core-concepts/internal-packages) to your new ap } ``` + + + + +```diff title="./apps/my-app/package.json" +{ + "name": "my-app", + "dependencies": { ++ "@repo/ui": "workspace:*" + } +} +``` + diff --git a/docs/site/content/docs/guides/generating-code.mdx b/docs/site/content/docs/guides/generating-code.mdx index fb26a0a1d6e82..71d8815284c82 100644 --- a/docs/site/content/docs/guides/generating-code.mdx +++ b/docs/site/content/docs/guides/generating-code.mdx @@ -126,6 +126,7 @@ For example, the following illustrates a monorepo with three locations for gener + @@ -170,42 +171,81 @@ For example, the following illustrates a monorepo with three locations for gener - - - - + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + - + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + - - - - - + + + + diff --git a/docs/site/content/docs/guides/index.mdx b/docs/site/content/docs/guides/index.mdx index 07c6d063bc5ef..dcd95ca865e0f 100644 --- a/docs/site/content/docs/guides/index.mdx +++ b/docs/site/content/docs/guides/index.mdx @@ -54,7 +54,7 @@ In our community-supported guides, you'll find examples of how to use `turbo` wi + + +```json title="package.json" +{ + "workspaces": ["apps/*"] +} +``` + + + ### Step 3: Add a package.json to the application @@ -263,6 +273,16 @@ The root package.json needs to have the `packageManager` field. This ensures dev + + +```json title="./package.json" +{ + "packageManager": "bun@1.2.0" +} +``` + + + ### Step 6: Run you package manager's install command @@ -295,6 +315,14 @@ npm install + + +```bash title="Terminal" +bun install +``` + + + Once you've done this, you should see a lockfile diff, indicating that the package has been added to the package manager's workspace. @@ -329,6 +357,14 @@ npm install turbo --save-dev + + +```bash title="Terminal" +bun install turbo --dev +``` + + + You can also optionally install `turbo` globally for added convenience when working with Turborepo. @@ -359,6 +395,14 @@ npm install turbo --global + + +```bash title="Terminal" +bun install turbo --global +``` + + + ### Step 8: Add a `turbo.json` @@ -410,6 +454,14 @@ npx turbo run build + + +```bash title="Terminal" +bunx turbo run build +``` + + + ### Step 10: Enable Remote Caching (optional) diff --git a/docs/site/content/docs/guides/multi-language.mdx b/docs/site/content/docs/guides/multi-language.mdx index 8d9b3fe88242f..df40be1f93b1f 100644 --- a/docs/site/content/docs/guides/multi-language.mdx +++ b/docs/site/content/docs/guides/multi-language.mdx @@ -50,6 +50,20 @@ As an example, you may have a Rust project in the `./cli` directory in your repo npm workspace documentation + + + ```json title="./package.json" + { + "workspaces": [ + "apps/*" + "packages/*", + "cli" // [!code highlight] + ] + } + ``` + + Bun workspace documentation + Then, add a `package.json` to the directory: @@ -118,6 +132,18 @@ For instance, if you wanted to make sure that the `rust-cli` "package" from abov + "@repo/rust-cli": "*" } } +``` + + + + + +```diff title="./web/package.json" +{ + "devDependencies": { ++ "@repo/rust-cli": "workspace:*" + } +} ``` diff --git a/docs/site/content/docs/guides/single-package-workspaces.mdx b/docs/site/content/docs/guides/single-package-workspaces.mdx index 2afa4f1e26c1c..23d0b2054a391 100644 --- a/docs/site/content/docs/guides/single-package-workspaces.mdx +++ b/docs/site/content/docs/guides/single-package-workspaces.mdx @@ -41,6 +41,13 @@ Install `turbo` into your application: ``` + + + ```bash title="Terminal" + bun install turbo --dev + ``` + + ### Running a `package.json` script using global `turbo` (optional) diff --git a/docs/site/content/docs/guides/tools/eslint.mdx b/docs/site/content/docs/guides/tools/eslint.mdx index 1d6c756549e1b..9c5d4b860b498 100644 --- a/docs/site/content/docs/guides/tools/eslint.mdx +++ b/docs/site/content/docs/guides/tools/eslint.mdx @@ -99,6 +99,16 @@ In our `web` app, we first need to add `@repo/eslint-config` as a dependency. "@repo/eslint-config": "*" } } +``` + + + +```jsonc title="./apps/web/package.json" +{ + "devDependencies": { + "@repo/eslint-config": "workspace:*" + } +} ``` @@ -233,6 +243,16 @@ In our `web` app, we first need to add `@repo/eslint-config` as a dependency. "@repo/eslint-config": "*" } } +``` + + + +```jsonc title="./apps/web/package.json" +{ + "dependencies": { + "@repo/eslint-config": "workspace:*" + } +} ``` diff --git a/docs/site/content/docs/guides/tools/jest.mdx b/docs/site/content/docs/guides/tools/jest.mdx index dbc28f505800a..c352b57beb55a 100644 --- a/docs/site/content/docs/guides/tools/jest.mdx +++ b/docs/site/content/docs/guides/tools/jest.mdx @@ -56,6 +56,14 @@ yarn workspace @repo/ui add jest --dev npm install jest --workspace=web --workspace=@repo/ui --save-dev ``` + + + + +```bash title="Terminal" +bun install jest --dev --filter=@repo/ui --filter=web +``` + diff --git a/docs/site/content/docs/guides/tools/playwright.mdx b/docs/site/content/docs/guides/tools/playwright.mdx index 6ab0fd95c711b..6da5be47c9829 100644 --- a/docs/site/content/docs/guides/tools/playwright.mdx +++ b/docs/site/content/docs/guides/tools/playwright.mdx @@ -133,4 +133,15 @@ You can also create a common package for shared utilities that you need in your + +```json title="./packages/playwright-utilities/package.json" +{ + "name": "@repo/playwright-utilities", + "peerDependencies": { + "playwright": "workspace:*" +} +} +``` + + diff --git a/docs/site/content/docs/guides/tools/shadcn-ui.mdx b/docs/site/content/docs/guides/tools/shadcn-ui.mdx index c560b1764a456..f67e1f334082f 100644 --- a/docs/site/content/docs/guides/tools/shadcn-ui.mdx +++ b/docs/site/content/docs/guides/tools/shadcn-ui.mdx @@ -33,6 +33,14 @@ npx shadcn@canary init npx shadcn@canary init ``` + + + + +```bash title="Terminal" +bunx shadcn@canary init +``` + @@ -64,6 +72,14 @@ npx shadcn@canary add [COMPONENT] npx shadcn@canary add [COMPONENT] ``` + + + + +```bash title="Terminal" +bunx shadcn@canary add [COMPONENT] +``` + diff --git a/docs/site/content/docs/guides/tools/storybook.mdx b/docs/site/content/docs/guides/tools/storybook.mdx index 9756686d15ceb..40976517bd962 100644 --- a/docs/site/content/docs/guides/tools/storybook.mdx +++ b/docs/site/content/docs/guides/tools/storybook.mdx @@ -37,6 +37,14 @@ yarn dlx create-turbo@latest -e design-system npx create-turbo@latest -e design-system ``` + + + + +```bash title="Terminal" +bunx create-turbo@latest -e design-system +``` + @@ -73,6 +81,14 @@ yarn dlx create-turbo@latest npx create-turbo@latest ``` + + + + +```bash title="Terminal" +bunx create-turbo@latest +``` + @@ -116,6 +132,14 @@ yarn create storybook@latest ```bash title="Terminal" npm create storybook@latest +``` + + + + + +```bash title="Terminal" +bun create storybook@latest ``` @@ -159,6 +183,14 @@ yarn workspace storybook add @repo/ui npm install @repo/ui --workspace=storybook ``` + + + + +```bash title="Terminal" +bun install @repo/ui --filter=storybook +``` + @@ -317,6 +349,14 @@ yarn workspace @repo/ui add @storybook/react --dev npm install @storybook/react --workspace=@repo/ui --save-dev ``` + + + + +```bash title="Terminal" +bun install @storybook/react --filter=@repo/ui --save-dev +``` + diff --git a/docs/site/content/docs/guides/tools/typescript.mdx b/docs/site/content/docs/guides/tools/typescript.mdx index 1883b03296666..a23dc6b6d2b50 100644 --- a/docs/site/content/docs/guides/tools/typescript.mdx +++ b/docs/site/content/docs/guides/tools/typescript.mdx @@ -52,6 +52,14 @@ yarn dlx create-turbo@latest npx create-turbo@latest ``` + + + + +```bash title="Terminal" +bunx create-turbo@latest +``` + @@ -132,6 +140,17 @@ First, install the `@repo/typescript-config` package into your package: } ``` + + +```json title="./apps/web/package.json" +{ + "devDependencies": { + "@repo/typescript-config": "workspace:*", + "typescript": "latest", + } +} +``` + Then, extend the `tsconfig.json` for the package from the `@repo/typescript-config` package. In this example, the `web` package is a Next.js application: diff --git a/docs/site/content/docs/reference/create-turbo.mdx b/docs/site/content/docs/reference/create-turbo.mdx index 6645e784df9a7..809db67448b8b 100644 --- a/docs/site/content/docs/reference/create-turbo.mdx +++ b/docs/site/content/docs/reference/create-turbo.mdx @@ -31,6 +31,13 @@ npx create-turbo@latest + +```bash title="Terminal" +bunx create-turbo@latest +``` + + + ## Start with an example @@ -60,6 +67,13 @@ npx create-turbo@latest --example [example-name] + +```bash title="Terminal" +bunx create-turbo@latest --example [example-name] +``` + + + Use any of the example's names below: @@ -103,6 +117,13 @@ npx create-turbo@latest --example [github-url] + +```bash title="Terminal" +bunx create-turbo@latest --example [github-url] +``` + + + ## Options diff --git a/docs/site/content/docs/reference/eslint-config-turbo.mdx b/docs/site/content/docs/reference/eslint-config-turbo.mdx index 0dcd2a1241383..c2527ae450bea 100644 --- a/docs/site/content/docs/reference/eslint-config-turbo.mdx +++ b/docs/site/content/docs/reference/eslint-config-turbo.mdx @@ -32,7 +32,15 @@ Install `eslint-config-turbo` into the location where your ESLint configuration ```bash title="Terminal" - npm i --save-dev eslint-config-turbo -w @acme/eslint-config + npm install --save-dev eslint-config-turbo -w @acme/eslint-config + ``` + + + + + + ```bash title="Terminal" + bun install --dev eslint-config-turbo --filter=@acme/eslint-config ``` diff --git a/docs/site/content/docs/reference/eslint-plugin-turbo.mdx b/docs/site/content/docs/reference/eslint-plugin-turbo.mdx index 6c125ed46909c..73b6d98aae30d 100644 --- a/docs/site/content/docs/reference/eslint-plugin-turbo.mdx +++ b/docs/site/content/docs/reference/eslint-plugin-turbo.mdx @@ -36,6 +36,14 @@ Install `eslint-config-turbo` into the location where your ESLint configuration ``` + + + + ```bash title="Terminal" + bun install --dev eslint-config-turbo --filter=@acme/eslint-config + ``` + + ## Usage (Flat Config `eslint.config.js`)