diff --git a/docs/repo-docs/getting-started/examples.mdx b/docs/repo-docs/getting-started/examples.mdx new file mode 100644 index 0000000000000..2f3f8248a737f --- /dev/null +++ b/docs/repo-docs/getting-started/examples.mdx @@ -0,0 +1,65 @@ +--- +title: Start with an example +description: Start with an example Turborepo. +--- + +import { PackageManagerTabs, Tabs, Tab } from '#/components/tabs'; +import { ExamplesTable } from '#/components/examples-table'; +import { Callout } from '#/components/callout'; + +Use `create-turbo` to bootstrap an example with your favorite tooling. + + + + +```bash title="Terminal" +# Use an example listed below +npx create-turbo@latest --example [example-name] + +# Use a GitHub repository from the community +npx create-turbo@latest --example [github-url] +``` + + + + + +```bash title="Terminal" +# Use an example listed below +yarn dlx create-turbo@latest --example [example-name] + +# Use a GitHub repository from the community +yarn dlx create-turbo@latest --example [github-url] +``` + + + + + +```bash title="Terminal" +# Use an example listed below +pnpm dlx create-turbo@latest --example [example-name] + +# Use a GitHub repository from the community +pnpm dlx create-turbo@latest --example [github-url] +``` + + + + +## Core-maintained examples + +This list is maintained by the Turborepo core team. Dependencies are kept as up-to-date as possible and GitHub Issues are accepted and addressed for these examples. + + + +## Community-maintained examples + +The community curates a set of examples to showcase ways to use common tools and libraries with Turborepo. To bootstrap your monorepo with one of the examples, use the `--example` flag: + + + GitHub Issues for these examples will be closed. If you find problems, please + submit a pull request with fixes. + + + diff --git a/docs/repo-docs/getting-started/index.mdx b/docs/repo-docs/getting-started/index.mdx index f30cbc36bc036..caf886f4670a3 100644 --- a/docs/repo-docs/getting-started/index.mdx +++ b/docs/repo-docs/getting-started/index.mdx @@ -50,7 +50,7 @@ To learn more about installing `turbo`, see the [installation guide](/repo/docs/ description="Start with a template" /> diff --git a/docs/repo-docs/getting-started/installation.mdx b/docs/repo-docs/getting-started/installation.mdx index 87f43c4f0c4ca..b9dcaf471f99a 100644 --- a/docs/repo-docs/getting-started/installation.mdx +++ b/docs/repo-docs/getting-started/installation.mdx @@ -5,7 +5,6 @@ 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'; Get started with Turborepo in a few moments using: @@ -38,7 +37,7 @@ The starter repository will have: - Two deployable applications - Three shared libraries for use in the rest of the monorepo -For more details on the starter, [visit the README for the basic starter on GitHub](https://github.com/vercel/turborepo/tree/main/examples/basic). You can also [use an example](/repo/docs/getting-started/installation#start-with-an-example) that more closely fits your tooling interests. +For more details on the starter, [visit the README for the basic starter on GitHub](https://github.com/vercel/turborepo/tree/main/examples/basic). You can also [use an example](/repo/docs/getting-started/examples) that more closely fits your tooling interests. ## Installing `turbo` @@ -120,51 +119,3 @@ When collaborating with other developers in a repository, it's a good idea to pi 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. This lets you to get the best of both installations: easily run commands in your terminal while maintaining a pinned version for consistent usage for all developers in the repository. - -## Start with an example - -The community curates a set of examples to showcase ways to use common tools and libraries with Turborepo. To bootstrap your monorepo with one of the examples, use the `--example` flag: - - - -```bash title="Terminal" -# Use an example listed below -npx create-turbo@latest --example [example-name] - -# Use a GitHub repository from the community - -npx create-turbo@latest --example [github-url] - -``` - - - - -```bash title="Terminal" -# Use an example listed below -yarn dlx create-turbo@latest --example [example-name] - -# Use a GitHub repository from the community -yarn dlx create-turbo@latest --example [github-url] -``` - - - - -```bash title="Terminal" -# Use an example listed below -pnpm dlx create-turbo@latest --example [example-name] - -# Use a GitHub repository from the community - -pnpm dlx create-turbo@latest --example [github-url] - -``` - - - - - -Use any of the example's names below: - - diff --git a/docs/repo-docs/getting-started/meta.json b/docs/repo-docs/getting-started/meta.json index e43bc92d668a8..33af2f69f3707 100644 --- a/docs/repo-docs/getting-started/meta.json +++ b/docs/repo-docs/getting-started/meta.json @@ -2,6 +2,7 @@ "defaultOpen": true, "pages": [ "installation", + "examples", "add-to-existing-repository", "editor-integration", "support-policy", diff --git a/docs/repo-docs/getting-started/support-policy.mdx b/docs/repo-docs/getting-started/support-policy.mdx index 67f29d60cda84..86c2cbb1bcc18 100644 --- a/docs/repo-docs/getting-started/support-policy.mdx +++ b/docs/repo-docs/getting-started/support-policy.mdx @@ -48,7 +48,7 @@ active Node.js version on your system, but [some packages in the Turborepo ecosy such as [`create-turbo`](/repo/docs/reference/create-turbo), [`turbo-ignore`](/repo/docs/reference/turbo-ignore), and [`eslint-config-turbo`](/repo/docs/reference/eslint-config-turbo) do. For these features, we intend to support the [Active and Maintenance LTS versions of Node.js](https://nodejs.org/en/about/previous-releases). -Turborepo's [examples](/repo/docs/getting-started/installation#start-with-an-example) are also expected to work with these Node.js versions. +Turborepo's [examples](/repo/docs/getting-started/examples) are also expected to work with these Node.js versions. ## Version control