Skip to content

Commit cffd0c6

Browse files
turbobot-tempTbotaPhantA
authored andcommitted
feat(create-turbo): create basic
0 parents  commit cffd0c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+6480
-0
lines changed

.eslintrc.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// This configuration only applies to the package manager root.
2+
/** @type {import("eslint").Linter.Config} */
3+
module.exports = {
4+
ignorePatterns: ["apps/**", "packages/**"],
5+
extends: ["@repo/eslint-config/library.js"],
6+
parser: "@typescript-eslint/parser",
7+
parserOptions: {
8+
project: true,
9+
},
10+
};

.gitignore

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# Dependencies
4+
node_modules
5+
.pnp
6+
.pnp.js
7+
8+
# Local env files
9+
.env
10+
.env.local
11+
.env.development.local
12+
.env.test.local
13+
.env.production.local
14+
15+
# Testing
16+
coverage
17+
18+
# Turbo
19+
.turbo
20+
21+
# Vercel
22+
.vercel
23+
24+
# Build Outputs
25+
.next/
26+
out/
27+
build
28+
dist
29+
30+
31+
# Debug
32+
npm-debug.log*
33+
yarn-debug.log*
34+
yarn-error.log*
35+
36+
# Misc
37+
.DS_Store
38+
*.pem

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
auto-install-peers = true

README.md

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Turborepo starter
2+
3+
This is an official starter Turborepo.
4+
5+
## Using this example
6+
7+
Run the following command:
8+
9+
```sh
10+
npx create-turbo@latest
11+
```
12+
13+
## What's inside?
14+
15+
This Turborepo includes the following packages/apps:
16+
17+
### Apps and Packages
18+
19+
- `docs`: a [Next.js](https://nextjs.org/) app
20+
- `web`: another [Next.js](https://nextjs.org/) app
21+
- `ui`: a stub React component library shared by both `web` and `docs` applications
22+
- `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
23+
- `tsconfig`: `tsconfig.json`s used throughout the monorepo
24+
25+
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
26+
27+
### Utilities
28+
29+
This Turborepo has some additional tools already setup for you:
30+
31+
- [TypeScript](https://www.typescriptlang.org/) for static type checking
32+
- [ESLint](https://eslint.org/) for code linting
33+
- [Prettier](https://prettier.io) for code formatting
34+
35+
### Build
36+
37+
To build all apps and packages, run the following command:
38+
39+
```
40+
cd my-turborepo
41+
pnpm build
42+
```
43+
44+
### Develop
45+
46+
To develop all apps and packages, run the following command:
47+
48+
```
49+
cd my-turborepo
50+
pnpm dev
51+
```
52+
53+
### Remote Caching
54+
55+
Turborepo can use a technique known as [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
56+
57+
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands:
58+
59+
```
60+
cd my-turborepo
61+
npx turbo login
62+
```
63+
64+
This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).
65+
66+
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
67+
68+
```
69+
npx turbo link
70+
```
71+
72+
## Useful Links
73+
74+
Learn more about the power of Turborepo:
75+
76+
- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
77+
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
78+
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
79+
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
80+
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
81+
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)

apps/docs/.eslintrc.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/** @type {import("eslint").Linter.Config} */
2+
module.exports = {
3+
root: true,
4+
extends: ["@repo/eslint-config/next.js"],
5+
parser: "@typescript-eslint/parser",
6+
parserOptions: {
7+
project: true,
8+
},
9+
};

apps/docs/README.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## Getting Started
2+
3+
First, run the development server:
4+
5+
```bash
6+
yarn dev
7+
```
8+
9+
Open [http://localhost:3001](http://localhost:3001) with your browser to see the result.
10+
11+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
12+
13+
To create [API routes](https://nextjs.org/docs/app/building-your-application/routing/router-handlers) add an `api/` directory to the `app/` directory with a `route.ts` file. For individual endpoints, create a subfolder in the `api` directory, like `api/hello/route.ts` would map to [http://localhost:3001/api/hello](http://localhost:3001/api/hello).
14+
15+
## Learn More
16+
17+
To learn more about Next.js, take a look at the following resources:
18+
19+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
20+
- [Learn Next.js](https://nextjs.org/learn/foundations/about-nextjs) - an interactive Next.js tutorial.
21+
22+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
23+
24+
## Deploy on Vercel
25+
26+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js.
27+
28+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

apps/docs/app/favicon.ico

8.07 KB
Binary file not shown.

apps/docs/app/globals.css

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
:root {
2+
--max-width: 1100px;
3+
--border-radius: 12px;
4+
--font-mono: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono",
5+
"Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro",
6+
"Fira Mono", "Droid Sans Mono", "Courier New", monospace;
7+
8+
--foreground-rgb: 255, 255, 255;
9+
--background-start-rgb: 0, 0, 0;
10+
--background-end-rgb: 0, 0, 0;
11+
12+
--callout-rgb: 20, 20, 20;
13+
--callout-border-rgb: 108, 108, 108;
14+
--card-rgb: 100, 100, 100;
15+
--card-border-rgb: 200, 200, 200;
16+
17+
--glow-conic: conic-gradient(
18+
from 180deg at 50% 50%,
19+
#2a8af6 0deg,
20+
#a853ba 180deg,
21+
#e92a67 360deg
22+
);
23+
}
24+
25+
* {
26+
box-sizing: border-box;
27+
padding: 0;
28+
margin: 0;
29+
}
30+
31+
html,
32+
body {
33+
max-width: 100vw;
34+
overflow-x: hidden;
35+
}
36+
37+
body {
38+
color: rgb(var(--foreground-rgb));
39+
background: linear-gradient(
40+
to bottom,
41+
transparent,
42+
rgb(var(--background-end-rgb))
43+
)
44+
rgb(var(--background-start-rgb));
45+
}
46+
47+
a {
48+
color: inherit;
49+
text-decoration: none;
50+
}

apps/docs/app/layout.tsx

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import "./globals.css";
2+
import type { Metadata } from "next";
3+
import { Inter } from "next/font/google";
4+
5+
const inter = Inter({ subsets: ["latin"] });
6+
7+
export const metadata: Metadata = {
8+
title: "Create Turborepo",
9+
description: "Generated by create turbo",
10+
};
11+
12+
export default function RootLayout({
13+
children,
14+
}: {
15+
children: React.ReactNode;
16+
}): JSX.Element {
17+
return (
18+
<html lang="en">
19+
<body className={inter.className}>{children}</body>
20+
</html>
21+
);
22+
}

0 commit comments

Comments
 (0)