From 2923783179cf9d6a18ce7b208b79ba134ac2fdee Mon Sep 17 00:00:00 2001 From: Anthony Shew Date: Mon, 10 Jun 2024 23:15:07 -0600 Subject: [PATCH] Fix formatting of docs directory. (#8416) ### Description Fixing formatting of `docs` directory. ### Testing Instructions --- .prettierrc | 10 ++++++ docs/pack-docs/advanced/profiling.mdx | 6 ++-- docs/pack-docs/benchmarks.mdx | 2 +- docs/pack-docs/features/css.mdx | 10 +++--- docs/pack-docs/features/imports.mdx | 10 +++--- docs/pack-docs/features/index.mdx | 2 +- docs/pack-docs/features/javascript.mdx | 2 +- docs/pack-docs/features/static-assets.mdx | 8 ++--- docs/pack-docs/index.mdx | 4 +-- docs/pack-docs/migrating-from-webpack.mdx | 2 +- docs/repo-docs/core-concepts/index.mdx | 2 +- .../core-concepts/internal-packages.mdx | 4 +-- .../core-concepts/package-and-task-graph.mdx | 2 +- .../repo-docs/core-concepts/package-types.mdx | 2 +- .../core-concepts/remote-caching.mdx | 22 ++++++------- .../crafting-your-repository/caching.mdx | 6 ++-- .../configuring-tasks.mdx | 26 +++++++-------- .../constructing-ci.mdx | 6 ++-- .../creating-an-internal-package.mdx | 10 +++--- .../developing-applications.mdx | 4 +-- .../crafting-your-repository/index.mdx | 4 +-- .../managing-dependencies.mdx | 6 ++-- .../running-tasks.mdx | 6 ++-- .../structuring-a-repository.mdx | 16 +++++----- .../crafting-your-repository/upgrading.mdx | 6 ++-- .../using-environment-variables.mdx | 6 ++-- .../add-to-existing-repository.mdx | 6 ++-- .../getting-started/editor-integration.mdx | 2 +- docs/repo-docs/getting-started/index.mdx | 6 ++-- .../getting-started/installation.mdx | 6 ++-- .../getting-started/support-policy.mdx | 2 +- docs/repo-docs/guides/ci-vendors/circleci.mdx | 4 +-- .../guides/ci-vendors/github-actions.mdx | 4 +-- .../repo-docs/guides/ci-vendors/gitlab-ci.mdx | 2 +- docs/repo-docs/guides/ci-vendors/index.mdx | 2 +- .../repo-docs/guides/ci-vendors/travis-ci.mdx | 2 +- docs/repo-docs/guides/frameworks/index.mdx | 2 +- docs/repo-docs/guides/frameworks/nextjs.mdx | 4 +-- docs/repo-docs/guides/frameworks/nuxt.mdx | 4 +-- .../repo-docs/guides/frameworks/sveltekit.mdx | 4 +-- docs/repo-docs/guides/frameworks/vite.mdx | 4 +-- docs/repo-docs/guides/generating-code.mdx | 6 ++-- docs/repo-docs/guides/handling-platforms.mdx | 6 ++-- docs/repo-docs/guides/index.mdx | 2 +- docs/repo-docs/guides/multi-language.mdx | 4 +-- .../repo-docs/guides/publishing-libraries.mdx | 4 +-- .../guides/single-package-workspaces.mdx | 4 +-- docs/repo-docs/guides/skipping-tasks.mdx | 2 +- docs/repo-docs/guides/tools/biome.mdx | 4 +-- docs/repo-docs/guides/tools/docker.mdx | 6 ++-- docs/repo-docs/guides/tools/eslint.mdx | 32 +++++++++---------- docs/repo-docs/guides/tools/index.mdx | 2 +- docs/repo-docs/guides/tools/jest.mdx | 8 ++--- docs/repo-docs/guides/tools/prisma.mdx | 12 +++---- docs/repo-docs/guides/tools/storybook.mdx | 18 +++++------ docs/repo-docs/guides/tools/typescript.mdx | 8 ++--- docs/repo-docs/guides/tools/vitest.mdx | 8 ++--- docs/repo-docs/reference/configuration.mdx | 4 +-- docs/repo-docs/reference/create-turbo.mdx | 4 +-- .../reference/eslint-config-turbo.mdx | 2 +- docs/repo-docs/reference/generate.mdx | 2 +- docs/repo-docs/reference/index.mdx | 2 +- .../reference/package-configurations.mdx | 2 +- docs/repo-docs/reference/prune.mdx | 2 +- docs/repo-docs/reference/run.mdx | 2 +- .../system-environment-variables.mdx | 2 +- docs/repo-docs/reference/telemetry.mdx | 2 +- docs/repo-docs/reference/turbo-codemod.mdx | 8 ++--- docs/repo-docs/reference/turbo-gen.mdx | 2 +- docs/repo-docs/reference/turbo-ignore.mdx | 4 +-- 70 files changed, 206 insertions(+), 196 deletions(-) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000000000..5c39c68bf8c2a --- /dev/null +++ b/.prettierrc @@ -0,0 +1,10 @@ +{ + "overrides": [ + { + "files": ["./docs/**/*.mdx"], + "options": { + "singleQuote": true + } + } + ] +} diff --git a/docs/pack-docs/advanced/profiling.mdx b/docs/pack-docs/advanced/profiling.mdx index f0c65fefdfbd9..54b34cf5fff2a 100644 --- a/docs/pack-docs/advanced/profiling.mdx +++ b/docs/pack-docs/advanced/profiling.mdx @@ -3,7 +3,7 @@ title: Profiling description: Learn how to profile Turbopack --- -import { ThemedImageFigure } from "#/components/image/themed-image-figure"; +import { ThemedImageFigure } from '#/components/image/themed-image-figure'; ## On macOS @@ -32,12 +32,12 @@ Once the program exits, the profiler will open the trace file in Instruments. Re Check back soon for benchmark results against real-world Next.js Applications diff --git a/docs/pack-docs/features/css.mdx b/docs/pack-docs/features/css.mdx index 10eb2dce72d47..7fcbdf5386767 100644 --- a/docs/pack-docs/features/css.mdx +++ b/docs/pack-docs/features/css.mdx @@ -3,7 +3,7 @@ title: CSS description: Learn more about CSS in Turbopack. --- -import { Callout } from "#/components/callout"; +import { Callout } from '#/components/callout'; CSS parsing and transformation is handled by [Lightning CSS](https://lightningcss.dev/). @@ -12,7 +12,7 @@ CSS parsing and transformation is handled by [Lightning CSS](https://lightningcs Importing CSS into global scope is built-in in Turbopack. ```tsx title="my-file.tsx" -import "./globals.css"; +import './globals.css'; ``` ## CSS Modules @@ -20,7 +20,7 @@ import "./globals.css"; Turbopack handles CSS Modules. Any file with a `.module.css` extension will be considered a CSS module, and you can import it into a JavaScript or TypeScript file: ```tsx title="component.tsx" -import cssExports from "./phone.module.css"; +import cssExports from './phone.module.css'; ``` This follows the same rules set out by [Next.js](https://nextjs.org/docs/basic-features/built-in-css-support#adding-component-level-css) - letting you easily distinguish between global and scoped CSS. @@ -51,8 +51,8 @@ Turbopack handles [CSS Nesting](https://developer.mozilla.org/en-US/docs/Web/CSS Using the CSS `@import` syntax to import other CSS files is supported. This gives you the ability to combine several CSS files together into a single module: ```css title="globals.css" -@import "./modal.css"; -@import "./dark.css"; +@import './modal.css'; +@import './dark.css'; ``` ## PostCSS diff --git a/docs/pack-docs/features/imports.mdx b/docs/pack-docs/features/imports.mdx index 9c40e6afad8b8..e74f4b5780a76 100644 --- a/docs/pack-docs/features/imports.mdx +++ b/docs/pack-docs/features/imports.mdx @@ -12,7 +12,7 @@ Turbopack bundles your application, so imports won't be resolved to native brows Turbopack supports the `require` syntax out-of-the-box: ```ts title="my-file.ts" -const { add } = require("./math"); +const { add } = require('./math'); add(1, 2); ``` @@ -22,11 +22,11 @@ add(1, 2); Importing via the `import` syntax is also supported out-of-the-box. This includes static assets, and `import type`: ```ts title="my-file.ts" -import img from "./img.png"; +import img from './img.png'; -import type { User } from "../server/types"; +import type { User } from '../server/types'; -import { z } from "zod"; +import { z } from 'zod'; ``` ## Dynamic Imports @@ -35,7 +35,7 @@ Turbopack supports dynamic imports via `import()`: ```ts title="my-file.ts" const getFeatureFlags = () => { - return import("/featureFlags").then((mod) => { + return import('/featureFlags').then((mod) => { return mod.featureFlags; }); }; diff --git a/docs/pack-docs/features/index.mdx b/docs/pack-docs/features/index.mdx index 093f96ce3571a..da63a17240db3 100644 --- a/docs/pack-docs/features/index.mdx +++ b/docs/pack-docs/features/index.mdx @@ -3,7 +3,7 @@ title: Features description: Learn about Turbopack's supported features --- -import { Cards, Card } from "#/components/card"; +import { Cards, Card } from '#/components/card'; The practice of building web applications is enormously diverse. In CSS alone, you have SCSS, Less, CSS Modules, PostCSS, and hundreds of other libraries. Frameworks like React, Vue and Svelte require custom setups. diff --git a/docs/pack-docs/features/javascript.mdx b/docs/pack-docs/features/javascript.mdx index 59bdc4f54852b..c4a53d48f18c2 100644 --- a/docs/pack-docs/features/javascript.mdx +++ b/docs/pack-docs/features/javascript.mdx @@ -3,7 +3,7 @@ title: JavaScript description: Learn more about JavaScript in Turbopack. --- -import { Callout } from "#/components/callout"; +import { Callout } from '#/components/callout'; ## ECMAScript Support diff --git a/docs/pack-docs/features/static-assets.mdx b/docs/pack-docs/features/static-assets.mdx index 906dcc3eadc37..7fbe6611e5282 100644 --- a/docs/pack-docs/features/static-assets.mdx +++ b/docs/pack-docs/features/static-assets.mdx @@ -10,7 +10,7 @@ Part of bundling for the web is handling all the asset types the web supports - Importing static assets works out of the box with Turbopack: ```ts title="my-file.ts" -import img from "./img.png"; +import img from './img.png'; ``` ### Next.js @@ -18,7 +18,7 @@ import img from "./img.png"; In webpack and some other frameworks, importing an image returns a string containing that image's URL. ```ts title="my-file.ts" -import img from "./img.png"; +import img from './img.png'; console.log(img); // /assets/static/1uahwd98h123.png ``` @@ -30,11 +30,11 @@ In Next.js, importing an image returns an object, containing various metadata ab Most frameworks allow you to import JSON directly into your application: ```ts title="my-file.ts" -import fixtures from "./fixtures.json"; +import fixtures from './fixtures.json'; ``` This is supported out of the box with Turbopack, as is performing a named import on that JSON: ```ts title="my-file.ts" -import { users, posts } from "./fixtures.json"; +import { users, posts } from './fixtures.json'; ``` diff --git a/docs/pack-docs/index.mdx b/docs/pack-docs/index.mdx index be2abd10911e1..d2e91d3180c8f 100644 --- a/docs/pack-docs/index.mdx +++ b/docs/pack-docs/index.mdx @@ -3,8 +3,8 @@ title: Getting started description: Start building web applications with Turbopack. --- -import { Callout } from "#/components/callout"; -import { PackageManagerTabs, Tab } from "#/components/tabs"; +import { Callout } from '#/components/callout'; +import { PackageManagerTabs, Tab } from '#/components/tabs'; Turbopack is an incremental bundler optimized for JavaScript and TypeScript, written in Rust by the creators of webpack and [Next.js](https://nextjs.org/) at [Vercel](https://vercel.com/). diff --git a/docs/pack-docs/migrating-from-webpack.mdx b/docs/pack-docs/migrating-from-webpack.mdx index 54174e61fedd5..2999fb153f058 100644 --- a/docs/pack-docs/migrating-from-webpack.mdx +++ b/docs/pack-docs/migrating-from-webpack.mdx @@ -3,7 +3,7 @@ title: Migrating from webpack to Turbopack description: Learn about how to migrate from webpack to its Rust-powered successor, Turbopack. --- -import { Callout } from "#/components/callout"; +import { Callout } from '#/components/callout'; We're planning Turbopack as the successor to webpack. In the future, we plan to give Turbopack all the tools needed to support your webpack app. diff --git a/docs/repo-docs/core-concepts/index.mdx b/docs/repo-docs/core-concepts/index.mdx index 9a53787131830..e6bbdf3ec0a53 100644 --- a/docs/repo-docs/core-concepts/index.mdx +++ b/docs/repo-docs/core-concepts/index.mdx @@ -3,7 +3,7 @@ title: Core concepts description: Learn about the core concepts behind Turborepo. --- -import { Card, Cards } from "#/components/card"; +import { Card, Cards } from '#/components/card'; Learn more about the core concepts of Turborepo: diff --git a/docs/repo-docs/core-concepts/internal-packages.mdx b/docs/repo-docs/core-concepts/internal-packages.mdx index 0ade3542b0abe..7cc30e5f36cc1 100644 --- a/docs/repo-docs/core-concepts/internal-packages.mdx +++ b/docs/repo-docs/core-concepts/internal-packages.mdx @@ -3,7 +3,7 @@ title: Internal Packages description: Learn how to build Internal Packages in your monorepo. --- -import { PackageManagerTabs, Tab } from "#/components/tabs"; +import { PackageManagerTabs, Tab } from '#/components/tabs'; Internal Packages are libraries whose source code is inside your Workspace. You can quickly make Internal Packages to share code within your monorepo and choose to [publish them to the npm registry](/repo/docs/guides/publishing-libraries) if you need to later. @@ -46,7 +46,7 @@ In the [Creating an Internal Package guide](/repo/docs/crafting-your-repository/ You can then import the package into your code like you're used to doing with an external package: ```tsx title="./apps/web/app/page.tsx" -import { Button } from "@repo/ui"; // [!code highlight] +import { Button } from '@repo/ui'; // [!code highlight] export default function Page() { return ; diff --git a/docs/repo-docs/core-concepts/package-and-task-graph.mdx b/docs/repo-docs/core-concepts/package-and-task-graph.mdx index 1081bb0060d03..73ac802c2b1e8 100644 --- a/docs/repo-docs/core-concepts/package-and-task-graph.mdx +++ b/docs/repo-docs/core-concepts/package-and-task-graph.mdx @@ -3,7 +3,7 @@ title: Package and Task Graphs description: Turborepo builds a Task Graph based on your configuration and repository structure. --- -import { File, Folder, Files } from "#/components/files"; +import { File, Folder, Files } from '#/components/files'; ## Package Graph diff --git a/docs/repo-docs/core-concepts/package-types.mdx b/docs/repo-docs/core-concepts/package-types.mdx index d1ddb307abea1..65040fb5b0141 100644 --- a/docs/repo-docs/core-concepts/package-types.mdx +++ b/docs/repo-docs/core-concepts/package-types.mdx @@ -3,7 +3,7 @@ title: Package types description: Learn about the different types of packages in a workspace. --- -import { Callout } from "#/components/callout"; +import { Callout } from '#/components/callout'; In Turborepo, we talk about two types of packages: diff --git a/docs/repo-docs/core-concepts/remote-caching.mdx b/docs/repo-docs/core-concepts/remote-caching.mdx index f2513d2a70d3a..7171ea6c4d63b 100644 --- a/docs/repo-docs/core-concepts/remote-caching.mdx +++ b/docs/repo-docs/core-concepts/remote-caching.mdx @@ -3,9 +3,9 @@ title: Remote Caching description: Share cache artifacts across machines for even faster builds. --- -import { Callout } from "#/components/callout"; -import { PlatformTabs, PackageManagerTabs, Tab } from "#/components/tabs"; -import { ThemeAwareImage } from "#/components/theme-aware-image"; +import { Callout } from '#/components/callout'; +import { PlatformTabs, PackageManagerTabs, Tab } from '#/components/tabs'; +import { ThemeAwareImage } from '#/components/theme-aware-image'; Turborepo's [task cache](/repo/docs/crafting-your-repository/caching) saves time by never doing the same work twice. @@ -13,16 +13,16 @@ But there's a problem: **the cache is local to your machine**. When you're worki yarn workspaces run lint && yarn w {add(1, 2)}; diff --git a/docs/repo-docs/crafting-your-repository/developing-applications.mdx b/docs/repo-docs/crafting-your-repository/developing-applications.mdx index 58e231668f911..c7d54729c600c 100644 --- a/docs/repo-docs/crafting-your-repository/developing-applications.mdx +++ b/docs/repo-docs/crafting-your-repository/developing-applications.mdx @@ -3,8 +3,8 @@ title: Developing applications description: Learn how to develop applications in your repository. --- -import { Tabs, Tab } from "#/components/tabs"; -import { LinkToDocumentation } from "#/components/link-to-documentation"; +import { Tabs, Tab } from '#/components/tabs'; +import { LinkToDocumentation } from '#/components/link-to-documentation'; Developing applications in a monorepo unlocks powerful workflows, enabling you to make atomic commits to source control with easy access to code. diff --git a/docs/repo-docs/crafting-your-repository/index.mdx b/docs/repo-docs/crafting-your-repository/index.mdx index 3c9f0fceb965c..46e68f5931ff5 100644 --- a/docs/repo-docs/crafting-your-repository/index.mdx +++ b/docs/repo-docs/crafting-your-repository/index.mdx @@ -3,8 +3,8 @@ title: Crafting your repository description: Design and build your Turborepo. --- -import { Card, Cards } from "#/components/card"; -import { Callout } from "#/components/callout"; +import { Card, Cards } from '#/components/card'; +import { Callout } from '#/components/callout'; Architecting a monorepo is a careful process. Through these guides, you'll learn how to design and build a monorepo that will make every team faster - no matter the size. diff --git a/docs/repo-docs/crafting-your-repository/managing-dependencies.mdx b/docs/repo-docs/crafting-your-repository/managing-dependencies.mdx index bde0c4ca4bbc1..22e043bf8e438 100644 --- a/docs/repo-docs/crafting-your-repository/managing-dependencies.mdx +++ b/docs/repo-docs/crafting-your-repository/managing-dependencies.mdx @@ -3,9 +3,9 @@ title: Managing dependencies description: Learn how to manage dependencies in your monorepo's workspace. --- -import { PackageManagerTabs, Tab } from "#/components/tabs"; -import { Callout } from "#/components/callout"; -import { LinkToDocumentation } from "#/components/link-to-documentation"; +import { PackageManagerTabs, Tab } from '#/components/tabs'; +import { Callout } from '#/components/callout'; +import { LinkToDocumentation } from '#/components/link-to-documentation'; - **External dependencies** come from [the npm registry](https://www.npmjs.com/), allowing you to leverage valuable code from the ecosystem to build your applications and libraries faster. - **Internal dependencies** let you share functionality within your repository, dramatically improving discoverability and usability of shared code. We will discuss how to build an Internal Package in [the next guide](/repo/docs/crafting-your-repository/creating-an-internal-package). diff --git a/docs/repo-docs/crafting-your-repository/running-tasks.mdx b/docs/repo-docs/crafting-your-repository/running-tasks.mdx index 163cb3ddadec3..e1529a7596978 100644 --- a/docs/repo-docs/crafting-your-repository/running-tasks.mdx +++ b/docs/repo-docs/crafting-your-repository/running-tasks.mdx @@ -3,9 +3,9 @@ title: Running tasks description: Learn how to run tasks in your repository through the `turbo` CLI. --- -import { Callout } from "#/components/callout"; -import { PackageManagerTabs, Tab } from "#/components/tabs"; -import { LinkToDocumentation } from "#/components/link-to-documentation"; +import { Callout } from '#/components/callout'; +import { PackageManagerTabs, Tab } from '#/components/tabs'; +import { LinkToDocumentation } from '#/components/link-to-documentation'; Turborepo optimizes the developer workflows in your repository by automatically parallelizing and caching tasks. Once a task is [registered in `turbo.json`](/repo/docs/crafting-your-repository/configuring-tasks), you have a powerful new toolset for running the scripts in your repository: diff --git a/docs/repo-docs/crafting-your-repository/structuring-a-repository.mdx b/docs/repo-docs/crafting-your-repository/structuring-a-repository.mdx index aca633f8d8711..5ef0314b3d811 100644 --- a/docs/repo-docs/crafting-your-repository/structuring-a-repository.mdx +++ b/docs/repo-docs/crafting-your-repository/structuring-a-repository.mdx @@ -3,11 +3,11 @@ title: Structuring a repository description: Start by creating a repository using the conventions of the ecosystem. --- -import { Callout } from "#/components/callout"; -import { PackageManagerTabs, Tab, Tabs } from "#/components/tabs"; -import { Step, Steps } from "#/components/steps"; -import { File, Folder, Files } from "#/components/files"; -import { LinkToDocumentation } from "#/components/link-to-documentation"; +import { Callout } from '#/components/callout'; +import { PackageManagerTabs, Tab, Tabs } from '#/components/tabs'; +import { Step, Steps } from '#/components/steps'; +import { File, Folder, Files } from '#/components/files'; +import { LinkToDocumentation } from '#/components/link-to-documentation'; `turbo` is built on top of [Workspaces](https://vercel.com/docs/vercel-platform/glossary#workspace), a feature of package managers in the JavaScript ecosystem that allows you to group multiple packages in one repository. @@ -293,9 +293,9 @@ For example, if you had a `@repo/math` package, you might have the following `ex This would allow you to import `add` and `subtract` functions from the `@repo/math` package like so: ```ts title="./apps/my-app/src/index.ts" -import { GRAVITATIONAL_CONSTANT, SPEED_OF_LIGHT } from "@repo/math"; -import { add } from "@repo/math/add"; -import { subtract } from "@repo/math/subtract"; +import { GRAVITATIONAL_CONSTANT, SPEED_OF_LIGHT } from '@repo/math'; +import { add } from '@repo/math/add'; +import { subtract } from '@repo/math/subtract'; ``` Using exports this way provides three major benefits: diff --git a/docs/repo-docs/crafting-your-repository/upgrading.mdx b/docs/repo-docs/crafting-your-repository/upgrading.mdx index cd491e74d8a78..9879661436e86 100644 --- a/docs/repo-docs/crafting-your-repository/upgrading.mdx +++ b/docs/repo-docs/crafting-your-repository/upgrading.mdx @@ -3,9 +3,9 @@ title: Upgrading description: Learn how to upgrade `turbo` to get the latest improvements to your repository. --- -import { PackageManagerTabs, Tab } from "#/components/tabs"; -import { Steps, Step } from "#/components/steps"; -import { Callout } from "#/components/callout"; +import { PackageManagerTabs, Tab } from '#/components/tabs'; +import { Steps, Step } from '#/components/steps'; +import { Callout } from '#/components/callout'; ## Upgrading to 2.0 diff --git a/docs/repo-docs/crafting-your-repository/using-environment-variables.mdx b/docs/repo-docs/crafting-your-repository/using-environment-variables.mdx index 69fd0889fc009..cb303c17ec709 100644 --- a/docs/repo-docs/crafting-your-repository/using-environment-variables.mdx +++ b/docs/repo-docs/crafting-your-repository/using-environment-variables.mdx @@ -3,9 +3,9 @@ title: Using environment variables description: Learn how to handle environments for your applications. --- -import { Callout } from "#/components/callout"; -import { Tabs, Tab } from "#/components/tabs"; -import { Accordion, Accordions } from "#/components/accordion"; +import { Callout } from '#/components/callout'; +import { Tabs, Tab } from '#/components/tabs'; +import { Accordion, Accordions } from '#/components/accordion'; Environment variable inputs are a vital part of your applications that you'll need to account for in your Turborepo configuration. diff --git a/docs/repo-docs/getting-started/add-to-existing-repository.mdx b/docs/repo-docs/getting-started/add-to-existing-repository.mdx index f121c9c9f21cb..aa723c840b4cc 100644 --- a/docs/repo-docs/getting-started/add-to-existing-repository.mdx +++ b/docs/repo-docs/getting-started/add-to-existing-repository.mdx @@ -3,9 +3,9 @@ title: Add to an existing repository description: Using Turborepo with your existing repository --- -import { Tabs, Tab } from "#/components/tabs"; -import { Callout } from "#/components/callout"; -import { Step, Steps } from "#/components/steps"; +import { Tabs, Tab } from '#/components/tabs'; +import { Callout } from '#/components/callout'; +import { Step, Steps } from '#/components/steps'; Turborepo can be incrementally adopted in **any repository, single or multi-package**, to speed up the developer and CI workflows of the repository. diff --git a/docs/repo-docs/getting-started/editor-integration.mdx b/docs/repo-docs/getting-started/editor-integration.mdx index 6aadca2c59496..1ae3fa06ebccd 100644 --- a/docs/repo-docs/getting-started/editor-integration.mdx +++ b/docs/repo-docs/getting-started/editor-integration.mdx @@ -3,7 +3,7 @@ title: Editor integration description: Making the most of Turborepo --- -import { Callout } from "#/components/callout"; +import { Callout } from '#/components/callout'; To get the best experience with `turbo`, Turborepo provides a few utilities for integrating with your editor. diff --git a/docs/repo-docs/getting-started/index.mdx b/docs/repo-docs/getting-started/index.mdx index c5e34dab97888..f30cbc36bc036 100644 --- a/docs/repo-docs/getting-started/index.mdx +++ b/docs/repo-docs/getting-started/index.mdx @@ -3,9 +3,9 @@ title: Getting started description: Get started with Turborepo. --- -import { Card, Cards } from "#/components/card"; -import { Step, Steps } from "#/components/steps"; -import { Tab, Tabs } from "#/components/tabs"; +import { Card, Cards } from '#/components/card'; +import { Step, Steps } from '#/components/steps'; +import { Tab, Tabs } from '#/components/tabs'; If you're new to Turborepo, you can follow these steps to get started. diff --git a/docs/repo-docs/getting-started/installation.mdx b/docs/repo-docs/getting-started/installation.mdx index 5dd86f3dd7c86..6e3c976df4997 100644 --- a/docs/repo-docs/getting-started/installation.mdx +++ b/docs/repo-docs/getting-started/installation.mdx @@ -3,9 +3,9 @@ title: Installation description: Learn how to get started with Turborepo. --- -import { Callout } from "#/components/callout"; -import { PackageManagerTabs, Tabs, Tab } from "#/components/tabs"; -import { ExamplesTable } from "#/components/examples-table"; +import { Callout } from '#/components/callout'; +import { PackageManagerTabs, Tabs, Tab } from '#/components/tabs'; +import { ExamplesTable } from '#/components/examples-table'; Get started with Turborepo in a few moments using: diff --git a/docs/repo-docs/getting-started/support-policy.mdx b/docs/repo-docs/getting-started/support-policy.mdx index d3ea9efe2f127..761679027fb4b 100644 --- a/docs/repo-docs/getting-started/support-policy.mdx +++ b/docs/repo-docs/getting-started/support-policy.mdx @@ -3,7 +3,7 @@ title: Support policy description: Learn about Turborepo's Support policy. --- -import { Callout } from "#/components/callout"; +import { Callout } from '#/components/callout'; ## Package managers diff --git a/docs/repo-docs/guides/ci-vendors/circleci.mdx b/docs/repo-docs/guides/ci-vendors/circleci.mdx index 9eaa1f39b72a5..4a577cb721d25 100644 --- a/docs/repo-docs/guides/ci-vendors/circleci.mdx +++ b/docs/repo-docs/guides/ci-vendors/circleci.mdx @@ -3,8 +3,8 @@ title: CircleCI description: Learn how to use CircleCI with Turborepo. --- -import { PackageManagerTabs, Tab } from "#/components/tabs"; -import { Callout } from "#/components/callout"; +import { PackageManagerTabs, Tab } from '#/components/tabs'; +import { Callout } from '#/components/callout'; The following example shows how to use Turborepo with [CircleCI](https://circleci.com/). diff --git a/docs/repo-docs/guides/ci-vendors/github-actions.mdx b/docs/repo-docs/guides/ci-vendors/github-actions.mdx index 435517b8d4b18..7abf06df43043 100644 --- a/docs/repo-docs/guides/ci-vendors/github-actions.mdx +++ b/docs/repo-docs/guides/ci-vendors/github-actions.mdx @@ -3,8 +3,8 @@ title: GitHub Actions description: Learn how to use GitHub Actions with Turborepo. --- -import { PackageManagerTabs, Tab } from "#/components/tabs"; -import { Steps, Step } from "#/components/steps"; +import { PackageManagerTabs, Tab } from '#/components/tabs'; +import { Steps, Step } from '#/components/steps'; The following example shows how to use Turborepo with [GitHub Actions](https://github.com/features/actions). diff --git a/docs/repo-docs/guides/ci-vendors/gitlab-ci.mdx b/docs/repo-docs/guides/ci-vendors/gitlab-ci.mdx index b70d97d98db2c..ffde773c25f0e 100644 --- a/docs/repo-docs/guides/ci-vendors/gitlab-ci.mdx +++ b/docs/repo-docs/guides/ci-vendors/gitlab-ci.mdx @@ -3,7 +3,7 @@ title: GitLab CI description: Learn how to use GitLab CI with Turborepo. --- -import { PackageManagerTabs, Tab } from "#/components/tabs"; +import { PackageManagerTabs, Tab } from '#/components/tabs'; The following example shows how to use Turborepo with [GitLab CI](https://docs.gitlab.com/ee/ci/). diff --git a/docs/repo-docs/guides/ci-vendors/index.mdx b/docs/repo-docs/guides/ci-vendors/index.mdx index ac19dda5a87d7..aeb30139cb0cc 100644 --- a/docs/repo-docs/guides/ci-vendors/index.mdx +++ b/docs/repo-docs/guides/ci-vendors/index.mdx @@ -3,7 +3,7 @@ title: Continuous Integration description: Recipes for using Turborepo with Vercel, GitHub Actions, and other continuous integration providers. --- -import { Cards, Card } from "#/components/card"; +import { Cards, Card } from '#/components/card'; Turborepo not only speeds up builds, but also the rest of your Continuous Integration pipeline by using [Remote Caching](/repo/docs/core-concepts/remote-caching). Below are a few platform recipes to use Turborepo with your CI providers. diff --git a/docs/repo-docs/guides/ci-vendors/travis-ci.mdx b/docs/repo-docs/guides/ci-vendors/travis-ci.mdx index 5a7860bd67397..b8cb089912b00 100644 --- a/docs/repo-docs/guides/ci-vendors/travis-ci.mdx +++ b/docs/repo-docs/guides/ci-vendors/travis-ci.mdx @@ -3,7 +3,7 @@ title: Travis CI description: How to use Travis CI with Turborepo to optimize your CI workflow --- -import { PackageManagerTabs, Tab } from "#/components/tabs"; +import { PackageManagerTabs, Tab } from '#/components/tabs'; The following example shows how to use Turborepo with [Travis CI](https://www.travis-ci.com/). diff --git a/docs/repo-docs/guides/frameworks/index.mdx b/docs/repo-docs/guides/frameworks/index.mdx index ef3c612a3a9d1..282301c54023f 100644 --- a/docs/repo-docs/guides/frameworks/index.mdx +++ b/docs/repo-docs/guides/frameworks/index.mdx @@ -3,7 +3,7 @@ title: Frameworks description: Integrate your favorite framework into Turborepo. --- -import { Cards, Card } from "#/components/card"; +import { Cards, Card } from '#/components/card'; Turborepo works with **any framework**. Below, you'll find guides for the most common frameworks being used with Turborepo. diff --git a/docs/repo-docs/guides/frameworks/nextjs.mdx b/docs/repo-docs/guides/frameworks/nextjs.mdx index 087cf0486d382..1174785f01e92 100644 --- a/docs/repo-docs/guides/frameworks/nextjs.mdx +++ b/docs/repo-docs/guides/frameworks/nextjs.mdx @@ -3,8 +3,8 @@ title: Next.js description: Learn how to use Next.js in a monorepo. --- -import { PackageManagerTabs, Tab } from "#/components/tabs"; -import { Callout } from "#/components/callout"; +import { PackageManagerTabs, Tab } from '#/components/tabs'; +import { Callout } from '#/components/callout'; [Next.js](https://nextjs.org) is the React framework for the web. Used by some of the world's largest companies, Next.js enables you to create high-quality web applications with the power of React components. diff --git a/docs/repo-docs/guides/frameworks/nuxt.mdx b/docs/repo-docs/guides/frameworks/nuxt.mdx index 1cc23e4eab314..32537cbff8f18 100644 --- a/docs/repo-docs/guides/frameworks/nuxt.mdx +++ b/docs/repo-docs/guides/frameworks/nuxt.mdx @@ -3,8 +3,8 @@ title: Nuxt description: Learn more about using Nuxt in your monorepo. --- -import { PackageManagerTabs, Tab } from "#/components/tabs"; -import { Callout } from "#/components/callout"; +import { PackageManagerTabs, Tab } from '#/components/tabs'; +import { Callout } from '#/components/callout'; [Nuxt](https://nuxt.com/) is an open source framework that makes web development intuitive and powerful. diff --git a/docs/repo-docs/guides/frameworks/sveltekit.mdx b/docs/repo-docs/guides/frameworks/sveltekit.mdx index e4c169c66a278..8aa93b9e98209 100644 --- a/docs/repo-docs/guides/frameworks/sveltekit.mdx +++ b/docs/repo-docs/guides/frameworks/sveltekit.mdx @@ -3,8 +3,8 @@ title: SvelteKit description: Learn more about using SvelteKit in your monorepo. --- -import { PackageManagerTabs, Tab } from "#/components/tabs"; -import { Callout } from "#/components/callout"; +import { PackageManagerTabs, Tab } from '#/components/tabs'; +import { Callout } from '#/components/callout'; [SvelteKit](https://kit.svelte.dev/) is a framework for rapidly developing robust, performant web applications using Svelte. diff --git a/docs/repo-docs/guides/frameworks/vite.mdx b/docs/repo-docs/guides/frameworks/vite.mdx index 38752f9316418..1b572c52b29e9 100644 --- a/docs/repo-docs/guides/frameworks/vite.mdx +++ b/docs/repo-docs/guides/frameworks/vite.mdx @@ -3,8 +3,8 @@ title: Vite description: Learn more about using Vite in your monorepo. --- -import { PackageManagerTabs, Tab } from "#/components/tabs"; -import { Callout } from "#/components/callout"; +import { PackageManagerTabs, Tab } from '#/components/tabs'; +import { Callout } from '#/components/callout'; [Vite](https://vitejs.dev/) is a build tool that aims to provide a faster and leaner development experience for modern web projects. diff --git a/docs/repo-docs/guides/generating-code.mdx b/docs/repo-docs/guides/generating-code.mdx index 9becf189040eb..d82e4751e50c9 100644 --- a/docs/repo-docs/guides/generating-code.mdx +++ b/docs/repo-docs/guides/generating-code.mdx @@ -3,9 +3,9 @@ title: Generating code description: Learn how to generate code using Turborepo. --- -import { Callout } from "#/components/callout"; -import { File, Folder, Files } from "#/components/files"; -import { PackageManagerTabs, Tab } from "#/components/tabs"; +import { Callout } from '#/components/callout'; +import { File, Folder, Files } from '#/components/files'; +import { PackageManagerTabs, Tab } from '#/components/tabs'; Splitting your monorepo into packages is a great way to organize your code, speed up tasks, and improve the local development experience. With Turborepo's code generation, it's easy to generate new source code for packages, modules, diff --git a/docs/repo-docs/guides/handling-platforms.mdx b/docs/repo-docs/guides/handling-platforms.mdx index 0af8332b681b1..860ae3e753840 100644 --- a/docs/repo-docs/guides/handling-platforms.mdx +++ b/docs/repo-docs/guides/handling-platforms.mdx @@ -18,11 +18,11 @@ First, create a script that accounts for the hash contributors that you are inte ```js title="./scripts/create-turbo-cache-key.js" #!/usr/bin/env node -const { writeFileSync } = require("fs"); -const { join } = require("path"); +const { writeFileSync } = require('fs'); +const { join } = require('path'); const { platform, arch } = process; -const file = "turbo-cache-key.json"; +const file = 'turbo-cache-key.json'; const str = JSON.stringify({ platform, arch }); console.log(`Generating cache key: ${str}`); writeFileSync(file, str); diff --git a/docs/repo-docs/guides/index.mdx b/docs/repo-docs/guides/index.mdx index 264a54aa32fee..c3a4256a5f5ad 100644 --- a/docs/repo-docs/guides/index.mdx +++ b/docs/repo-docs/guides/index.mdx @@ -3,7 +3,7 @@ title: Guides description: Learn how to use your favorite tooling in a Turborepo. --- -import { Cards, Card } from "#/components/card"; +import { Cards, Card } from '#/components/card'; Turborepo works with your favorite frameworks, CI providers, tools, and use cases. diff --git a/docs/repo-docs/guides/multi-language.mdx b/docs/repo-docs/guides/multi-language.mdx index 83f6902aaf26d..aa3bd8bc1970a 100644 --- a/docs/repo-docs/guides/multi-language.mdx +++ b/docs/repo-docs/guides/multi-language.mdx @@ -3,8 +3,8 @@ title: Multi-language support description: Learn how to use multiple languages with Turborepo. --- -import { PackageManagerTabs, Tab } from "#/components/tabs"; -import { LinkToDocumentation } from "#/components/link-to-documentation"; +import { PackageManagerTabs, Tab } from '#/components/tabs'; +import { LinkToDocumentation } from '#/components/link-to-documentation'; Turborepo is built on the conventions of the JavaScript ecosystem to find scripts and tasks to execute - but it doesn't care what those scripts do. Following [the guidance for specifying a package in a JavaScript workspace](/repo/docs/crafting-your-repository/structuring-a-repository#specifying-packages-in-a-monorepo), you can add any other language or toolchain to Turborepo. diff --git a/docs/repo-docs/guides/publishing-libraries.mdx b/docs/repo-docs/guides/publishing-libraries.mdx index c4fa7adbe1f60..7e4f631dad0e0 100644 --- a/docs/repo-docs/guides/publishing-libraries.mdx +++ b/docs/repo-docs/guides/publishing-libraries.mdx @@ -3,8 +3,8 @@ title: Publishing libraries description: Learn how to publish libraries to the npm registry from a monorepo. --- -import { Callout } from "#/components/callout"; -import { Tabs, Tab } from "#/components/tabs"; +import { Callout } from '#/components/callout'; +import { Tabs, Tab } from '#/components/tabs'; Publishing a package to the npm registry from a monorepo can be a smooth experience, with the right tools. diff --git a/docs/repo-docs/guides/single-package-workspaces.mdx b/docs/repo-docs/guides/single-package-workspaces.mdx index a355f41dab526..a8ff743fcf7e5 100644 --- a/docs/repo-docs/guides/single-package-workspaces.mdx +++ b/docs/repo-docs/guides/single-package-workspaces.mdx @@ -3,8 +3,8 @@ title: Single-package workspaces description: Learn how to use Turborepo in a single-package workspace. --- -import { Callout } from "#/components/callout"; -import { PackageManagerTabs, Tab } from "#/components/tabs"; +import { Callout } from '#/components/callout'; +import { PackageManagerTabs, Tab } from '#/components/tabs'; While Turborepo is highly effective in [multi-package workspaces](https://vercel.com/docs/vercel-platform/glossary#multi-package-workspace) (commonly referred to as monorepos), it can also be used to make [single-package workspaces](https://vercel.com/docs/vercel-platform/glossary#single-package-workspace) faster. diff --git a/docs/repo-docs/guides/skipping-tasks.mdx b/docs/repo-docs/guides/skipping-tasks.mdx index 1dde69687f21d..b5c82504e841a 100644 --- a/docs/repo-docs/guides/skipping-tasks.mdx +++ b/docs/repo-docs/guides/skipping-tasks.mdx @@ -3,7 +3,7 @@ title: Skipping tasks description: Never do the same work twice. --- -import { Callout } from "#/components/callout"; +import { Callout } from '#/components/callout'; [Caching](/repo/docs/crafting-your-repository/caching) dramatically speeds up your tasks - but you may be able to go even faster by using `npx turbo-ignore`. If a workspace is unaffected by your code changes, you can completely skip executing a task altogether. diff --git a/docs/repo-docs/guides/tools/biome.mdx b/docs/repo-docs/guides/tools/biome.mdx index 781593961aff4..df40205cb8474 100644 --- a/docs/repo-docs/guides/tools/biome.mdx +++ b/docs/repo-docs/guides/tools/biome.mdx @@ -3,8 +3,8 @@ title: Biome description: Learn how to use Biome in your Turborepo projects. --- -import { Callout } from "#/components/callout"; -import { CreateTurboCallout } from "./create-turbo-callout.tsx"; +import { Callout } from '#/components/callout'; +import { CreateTurboCallout } from './create-turbo-callout.tsx'; [Biome](https://biomejs.dev/) is a fast formatter for JavaScript, TypeScript, JSX, and JSON that saves CI and developer time. diff --git a/docs/repo-docs/guides/tools/docker.mdx b/docs/repo-docs/guides/tools/docker.mdx index 89f061710588e..5204e3f4b8709 100644 --- a/docs/repo-docs/guides/tools/docker.mdx +++ b/docs/repo-docs/guides/tools/docker.mdx @@ -3,9 +3,9 @@ title: Docker description: Learn how to use Docker in a monorepo. --- -import { Callout } from "#/components/callout"; -import { File, Folder, Files } from "#/components/files"; -import { CreateTurboCallout } from "./create-turbo-callout.tsx"; +import { Callout } from '#/components/callout'; +import { File, Folder, Files } from '#/components/files'; +import { CreateTurboCallout } from './create-turbo-callout.tsx'; Building a [Docker](https://www.docker.com/) image is a common way to deploy all sorts of applications. However, doing so from a monorepo has several challenges. diff --git a/docs/repo-docs/guides/tools/eslint.mdx b/docs/repo-docs/guides/tools/eslint.mdx index ce382c015da52..8d03268348216 100644 --- a/docs/repo-docs/guides/tools/eslint.mdx +++ b/docs/repo-docs/guides/tools/eslint.mdx @@ -3,10 +3,10 @@ title: ESLint description: Learn how to use ESLint in a monorepo. --- -import { PackageManagerTabs, Tabs, Tab } from "#/components/tabs"; -import { Callout } from "#/components/callout"; -import { Files, Folder, File } from "#/components/files"; -import { CreateTurboCallout } from "./create-turbo-callout.tsx"; +import { PackageManagerTabs, Tabs, Tab } from '#/components/tabs'; +import { Callout } from '#/components/callout'; +import { Files, Folder, File } from '#/components/files'; +import { CreateTurboCallout } from './create-turbo-callout.tsx'; ESLint is a static analysis tool for quickly finding and fixing problems in your JavaScript code. @@ -90,9 +90,9 @@ Our `@repo/eslint-config` file contains two files, `next.js`, and `library.js`. Let's investigate the `next.js` lint configuration: ```js title="./packages/eslint-config/next.js" -const { resolve } = require("node:path"); +const { resolve } = require('node:path'); -const project = resolve(process.cwd(), "tsconfig.json"); +const project = resolve(process.cwd(), 'tsconfig.json'); /* * This is a custom ESLint configuration for use with @@ -105,14 +105,14 @@ const project = resolve(process.cwd(), "tsconfig.json"); module.exports = { extends: [ - "@vercel/style-guide/eslint/node", - "@vercel/style-guide/eslint/typescript", - "@vercel/style-guide/eslint/browser", - "@vercel/style-guide/eslint/react", - "@vercel/style-guide/eslint/next", + '@vercel/style-guide/eslint/node', + '@vercel/style-guide/eslint/typescript', + '@vercel/style-guide/eslint/browser', + '@vercel/style-guide/eslint/react', + '@vercel/style-guide/eslint/next', // Turborepo custom eslint configuration configures the following rules: // - https://github.com/vercel/turbo/blob/main/packages/eslint-plugin-turbo/docs/rules/no-undeclared-env-vars.md - "eslint-config-turbo", + 'eslint-config-turbo', ].map(require.resolve), parserOptions: { project, @@ -122,16 +122,16 @@ module.exports = { JSX: true, }, settings: { - "import/resolver": { + 'import/resolver': { typescript: { project, }, }, }, - ignorePatterns: ["node_modules/", "dist/"], + ignorePatterns: ['node_modules/', 'dist/'], // add rules configurations here rules: { - "import/no-default-export": "off", + 'import/no-default-export': 'off', }, }; ``` @@ -193,7 +193,7 @@ We can then import the config like this: ```js title="./apps/web/.eslintrc.js" module.exports = { root: true, - extends: ["@repo/eslint-config/next.js"], + extends: ['@repo/eslint-config/next.js'], }; ``` diff --git a/docs/repo-docs/guides/tools/index.mdx b/docs/repo-docs/guides/tools/index.mdx index 85c5b9ad2057e..b82a791ae2910 100644 --- a/docs/repo-docs/guides/tools/index.mdx +++ b/docs/repo-docs/guides/tools/index.mdx @@ -3,7 +3,7 @@ title: Tools description: Learn how to use your favorite tools in a monorepo. --- -import { Cards, Card } from "#/components/card"; +import { Cards, Card } from '#/components/card'; Turborepo works with **all of your favorite tooling**. Below, you'll find guides for the most common tools being used with Turborepo. diff --git a/docs/repo-docs/guides/tools/jest.mdx b/docs/repo-docs/guides/tools/jest.mdx index d86c85598317f..0deb532af0538 100644 --- a/docs/repo-docs/guides/tools/jest.mdx +++ b/docs/repo-docs/guides/tools/jest.mdx @@ -3,10 +3,10 @@ title: Jest description: Learn how to use Jest in a Turborepo. --- -import { Callout } from "#/components/callout"; -import { File, Folder, Files } from "#/components/files"; -import { PackageManagerTabs, Tabs, Tab } from "#/components/tabs"; -import { CreateTurboCallout } from "./create-turbo-callout.tsx"; +import { Callout } from '#/components/callout'; +import { File, Folder, Files } from '#/components/files'; +import { PackageManagerTabs, Tabs, Tab } from '#/components/tabs'; +import { CreateTurboCallout } from './create-turbo-callout.tsx'; [Jest](https://jestjs.io/) is a common test runner with a vast ecosystem. Integrating with Turborepo will lead to enormous speed-ups. diff --git a/docs/repo-docs/guides/tools/prisma.mdx b/docs/repo-docs/guides/tools/prisma.mdx index 8a06cdc0d1f76..822c789aff19b 100644 --- a/docs/repo-docs/guides/tools/prisma.mdx +++ b/docs/repo-docs/guides/tools/prisma.mdx @@ -3,10 +3,10 @@ title: Prisma description: Learn how to use Prisma in a Turborepo. --- -import { PackageManagerTabs, Tab } from "#/components/tabs"; -import { Callout } from "#/components/callout"; -import { Steps, Step } from "#/components/steps"; -import { CreateTurboCallout } from "./create-turbo-callout.tsx"; +import { PackageManagerTabs, Tab } from '#/components/tabs'; +import { Callout } from '#/components/callout'; +import { Steps, Step } from '#/components/steps'; +import { CreateTurboCallout } from './create-turbo-callout.tsx'; [Prisma](https://www.prisma.io/) unlocks a new level of developer experience when working with databases thanks to its intuitive data model, automated migrations, type-safety & auto-completion. @@ -116,7 +116,7 @@ Now, run `turbo db:push db:generate` from the root of our repository to automati Next, export the `@prisma/client` so it can used in your applications. Let's add an `index.ts` file to `packages/database`: ```ts title="packages/database/src/index.ts" -export * from "@prisma/client"; +export * from '@prisma/client'; ``` Following the [Just-in-Time packaging pattern](/repo/docs/core-concepts/internal-packages#just-in-time-packages), you'll also create an entrypoint to the package inside `packages/database/package.json`. @@ -178,7 +178,7 @@ Run your package manager's install command. You can now import `PrismaClient` from `database` anywhere in your app: ```ts title="./apps/web/app/page.tsx" -import { PrismaClient } from "@repo/db"; +import { PrismaClient } from '@repo/db'; const client = new PrismaClient(); ``` diff --git a/docs/repo-docs/guides/tools/storybook.mdx b/docs/repo-docs/guides/tools/storybook.mdx index d1a01953ea3d6..ee610f6a9315b 100644 --- a/docs/repo-docs/guides/tools/storybook.mdx +++ b/docs/repo-docs/guides/tools/storybook.mdx @@ -3,9 +3,9 @@ title: Storybook description: Learn how to use Storybook in a Turborepo. --- -import { PackageManagerTabs, Tab } from "#/components/tabs"; -import { Callout } from "#/components/callout"; -import { Steps, Step } from "#/components/steps"; +import { PackageManagerTabs, Tab } from '#/components/tabs'; +import { Callout } from '#/components/callout'; +import { Steps, Step } from '#/components/steps'; [Storybook](https://storybook.js.org/) is a popular way to build UI components in an isolated environment. By putting Storybook into your Turborepo, you can easily develop your design system right alongside your applications. @@ -167,13 +167,13 @@ Delete the stories and components found in `src/stories` that were created by th As an example, here is a story for the `Button` component from `@repo/ui/button`. ```tsx title="./apps/storybook/src/stories/Button.stories.tsx" -import type { Meta, StoryObj } from "@storybook/react"; -import { Button } from "@repo/ui/button"; +import type { Meta, StoryObj } from '@storybook/react'; +import { Button } from '@repo/ui/button'; const meta = { - title: "Example/Button", + title: 'Example/Button', component: Button, - tags: ["autodocs"], + tags: ['autodocs'], } satisfies Meta; export default meta; @@ -181,8 +181,8 @@ type Story = StoryObj; export const Primary: Story = { args: { - appName: "Button", - children: "I am a primary button.", + appName: 'Button', + children: 'I am a primary button.', }, }; ``` diff --git a/docs/repo-docs/guides/tools/typescript.mdx b/docs/repo-docs/guides/tools/typescript.mdx index a0fc096a52d30..7428e4f11fd98 100644 --- a/docs/repo-docs/guides/tools/typescript.mdx +++ b/docs/repo-docs/guides/tools/typescript.mdx @@ -3,10 +3,10 @@ title: TypeScript description: Learn how to use TypeScript in a monorepo. --- -import { Callout } from "#/components/callout"; -import { File, Folder, Files } from "#/components/files"; -import { PackageManagerTabs, Tab } from "#/components/tabs"; -import { LinkToDocumentation } from "#/components/link-to-documentation"; +import { Callout } from '#/components/callout'; +import { File, Folder, Files } from '#/components/files'; +import { PackageManagerTabs, Tab } from '#/components/tabs'; +import { LinkToDocumentation } from '#/components/link-to-documentation'; TypeScript is an excellent tool in monorepos, allowing teams to safely add types to their JavaScript code. While there is some complexity to getting set up, this guide will walk you through the important parts of a TypeScript setup for most use cases. diff --git a/docs/repo-docs/guides/tools/vitest.mdx b/docs/repo-docs/guides/tools/vitest.mdx index c78811a0ed7fd..dcd6d66e93e28 100644 --- a/docs/repo-docs/guides/tools/vitest.mdx +++ b/docs/repo-docs/guides/tools/vitest.mdx @@ -3,10 +3,10 @@ title: Vitest description: Learn how to use Vitest in a monorepo. --- -import { Callout } from "#/components/callout"; -import { File, Folder, Files } from "#/components/files"; -import { CreateTurboCallout } from "./create-turbo-callout.tsx"; -import { Tab, Tabs } from "#/components/tabs"; +import { Callout } from '#/components/callout'; +import { File, Folder, Files } from '#/components/files'; +import { CreateTurboCallout } from './create-turbo-callout.tsx'; +import { Tab, Tabs } from '#/components/tabs'; [Vitest](https://vitest.dev/) is a test runner from the Vite ecosystem. Integrating it with Turborepo will lead to enormous speed-ups. diff --git a/docs/repo-docs/reference/configuration.mdx b/docs/repo-docs/reference/configuration.mdx index c0566e235c12f..12da13dba4e10 100644 --- a/docs/repo-docs/reference/configuration.mdx +++ b/docs/repo-docs/reference/configuration.mdx @@ -3,8 +3,8 @@ title: Configuring turbo.json description: Learn how to configure Turborepo through `turbo.json`. --- -import { Callout } from "#/components/callout"; -import Link from "next/link"; +import { Callout } from '#/components/callout'; +import Link from 'next/link'; Configure the behavior of `turbo` by adding a `turbo.json` file in your Workspace's root directory. diff --git a/docs/repo-docs/reference/create-turbo.mdx b/docs/repo-docs/reference/create-turbo.mdx index aa5610b7846fd..48d1a7d542acd 100644 --- a/docs/repo-docs/reference/create-turbo.mdx +++ b/docs/repo-docs/reference/create-turbo.mdx @@ -3,8 +3,8 @@ title: create-turbo description: Quickly set up a new Turborepo repository from scratch. --- -import { PackageManagerTabs, Tab } from "#/components/tabs"; -import { ExamplesTable } from "#/components/examples-table"; +import { PackageManagerTabs, Tab } from '#/components/tabs'; +import { ExamplesTable } from '#/components/examples-table'; The easiest way to get started with Turborepo is by using `create-turbo`. Use this CLI tool to quickly start building a new monorepo, with everything set up for you. diff --git a/docs/repo-docs/reference/eslint-config-turbo.mdx b/docs/repo-docs/reference/eslint-config-turbo.mdx index 688b0f3a222c6..5436633059c44 100644 --- a/docs/repo-docs/reference/eslint-config-turbo.mdx +++ b/docs/repo-docs/reference/eslint-config-turbo.mdx @@ -3,7 +3,7 @@ title: eslint-config-turbo description: Learn more about eslint-config-turbo. --- -import { PackageManagerTabs, Tab } from "#/components/tabs"; +import { PackageManagerTabs, Tab } from '#/components/tabs'; [The `eslint-config-turbo` package](https://www.npmjs.com/package/eslint-config-turbo) helps you find environment variables that are used in your code that are not a part of Turborepo's hashing. Environment variables used in your source code that are not accounted for in `turbo.json` will be highlighted in your editor and errors will show as ESLint output. diff --git a/docs/repo-docs/reference/generate.mdx b/docs/repo-docs/reference/generate.mdx index f109b88084545..a857412d60c5b 100644 --- a/docs/repo-docs/reference/generate.mdx +++ b/docs/repo-docs/reference/generate.mdx @@ -3,7 +3,7 @@ title: generate description: API reference for the `turbo generate` command --- -import { Callout } from "#/components/callout"; +import { Callout } from '#/components/callout'; Extend your Turborepo with new apps and packages. diff --git a/docs/repo-docs/reference/index.mdx b/docs/repo-docs/reference/index.mdx index 2b7d674bfd005..e1fd4272fca03 100644 --- a/docs/repo-docs/reference/index.mdx +++ b/docs/repo-docs/reference/index.mdx @@ -3,7 +3,7 @@ title: Turborepo API reference description: Learn about Turborepo's APIs using the reference. --- -import { Card, Cards } from "#/components/card"; +import { Card, Cards } from '#/components/card'; Turborepo's API reference is broken up into the following sections: diff --git a/docs/repo-docs/reference/package-configurations.mdx b/docs/repo-docs/reference/package-configurations.mdx index 091d4d7061b8f..4370cfed40c5e 100644 --- a/docs/repo-docs/reference/package-configurations.mdx +++ b/docs/repo-docs/reference/package-configurations.mdx @@ -3,7 +3,7 @@ title: Package Configurations description: Learn how to use Package Configurations to bring greater task flexibility to your monorepo's package. --- -import { Callout } from "#/components/callout"; +import { Callout } from '#/components/callout'; Many monorepos can declare a `turbo.json` in the root directory with a [task description](/repo/docs/reference/configuration#tasks) that applies to all packages. But, sometimes, a monorepo can contain packages that need to configure their tasks differently. diff --git a/docs/repo-docs/reference/prune.mdx b/docs/repo-docs/reference/prune.mdx index cc0fd4b9eb251..d51d951b7ebed 100644 --- a/docs/repo-docs/reference/prune.mdx +++ b/docs/repo-docs/reference/prune.mdx @@ -3,7 +3,7 @@ title: prune description: API reference for the `turbo prune` command --- -import { File, Folder, Files } from "#/components/files"; +import { File, Folder, Files } from '#/components/files'; Generate a partial monorepo for a target package. The output will be placed into a directory named `out` containing the following: diff --git a/docs/repo-docs/reference/run.mdx b/docs/repo-docs/reference/run.mdx index 150dda5f965ed..5c4fed08c4305 100644 --- a/docs/repo-docs/reference/run.mdx +++ b/docs/repo-docs/reference/run.mdx @@ -3,7 +3,7 @@ title: run description: API reference for the `turbo run` command --- -import { Callout } from "#/components/callout"; +import { Callout } from '#/components/callout'; Run tasks specified in `turbo.json`. diff --git a/docs/repo-docs/reference/system-environment-variables.mdx b/docs/repo-docs/reference/system-environment-variables.mdx index 248fdfc8c123f..4abc3a6c2516c 100644 --- a/docs/repo-docs/reference/system-environment-variables.mdx +++ b/docs/repo-docs/reference/system-environment-variables.mdx @@ -3,7 +3,7 @@ title: System environment variables description: Learn about system variables used by Turborepo. --- -import { Heading } from "fumadocs-ui/components/heading"; +import { Heading } from 'fumadocs-ui/components/heading'; By setting certain environment variables, you can change Turborepo's behavior. This can be useful for creating specific configurations for different environments and machines. diff --git a/docs/repo-docs/reference/telemetry.mdx b/docs/repo-docs/reference/telemetry.mdx index 46b541703b963..832441612b1b5 100644 --- a/docs/repo-docs/reference/telemetry.mdx +++ b/docs/repo-docs/reference/telemetry.mdx @@ -3,7 +3,7 @@ title: telemetry description: API reference for the `turbo telemetry` command --- -import { LinkToDocumentation } from "#/components/link-to-documentation"; +import { LinkToDocumentation } from '#/components/link-to-documentation'; `turbo telemetry [argument]` diff --git a/docs/repo-docs/reference/turbo-codemod.mdx b/docs/repo-docs/reference/turbo-codemod.mdx index e853729980460..dd1e0a53e6f65 100644 --- a/docs/repo-docs/reference/turbo-codemod.mdx +++ b/docs/repo-docs/reference/turbo-codemod.mdx @@ -1,11 +1,11 @@ --- -title: "@turbo/codemod" +title: '@turbo/codemod' description: Learn more about how Turborepo uses codemods to make version migrations easy. --- -import { Tabs, Tab } from "#/components/tabs"; -import { Callout } from "#/components/callout"; -import { Accordion, Accordions } from "#/components/accordion"; +import { Tabs, Tab } from '#/components/tabs'; +import { Callout } from '#/components/callout'; +import { Accordion, Accordions } from '#/components/accordion'; Turborepo provides codemod transformations and automatic migration scripts to help upgrade your Turborepo codebase when a feature is deprecated. diff --git a/docs/repo-docs/reference/turbo-gen.mdx b/docs/repo-docs/reference/turbo-gen.mdx index 3ca41cdc10c3f..b846d7a96606f 100644 --- a/docs/repo-docs/reference/turbo-gen.mdx +++ b/docs/repo-docs/reference/turbo-gen.mdx @@ -1,5 +1,5 @@ --- -title: "@turbo/gen" +title: '@turbo/gen' description: Quickly generate new code in your Turborepo. --- diff --git a/docs/repo-docs/reference/turbo-ignore.mdx b/docs/repo-docs/reference/turbo-ignore.mdx index 0341241072ed3..e4c9d1b98ee64 100644 --- a/docs/repo-docs/reference/turbo-ignore.mdx +++ b/docs/repo-docs/reference/turbo-ignore.mdx @@ -1,6 +1,6 @@ --- -title: "turbo-ignore" -description: "Learn how to use turbo-ignore to skip tasks in CI." +title: 'turbo-ignore' +description: 'Learn how to use turbo-ignore to skip tasks in CI.' --- Use `turbo` to determine of a package or its dependencies have changes. This can be useful for quickly skipping tasks in CI.