Skip to content

Commit 27ae70d

Browse files
committed
Initial commit from Create Turborepo
0 parents  commit 27ae70d

31 files changed

+2901
-0
lines changed

.eslintrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
root: true,
3+
// This tells ESLint to load the config from the package `eslint-config-custom`
4+
extends: ["custom"],
5+
settings: {
6+
next: {
7+
rootDir: ["apps/*/"],
8+
},
9+
},
10+
};

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
# testing
9+
coverage
10+
11+
# next.js
12+
.next/
13+
out/
14+
build
15+
16+
# misc
17+
.DS_Store
18+
*.pem
19+
20+
# debug
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
.pnpm-debug.log*
25+
26+
# local env files
27+
.env.local
28+
.env.development.local
29+
.env.test.local
30+
.env.production.local
31+
32+
# turbo
33+
.turbo

README.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Turborepo starter
2+
3+
This is an official Yarn v1 starter turborepo.
4+
5+
## What's inside?
6+
7+
This turborepo uses [Yarn](https://classic.yarnpkg.com/) as a package manager. It includes the following packages/apps:
8+
9+
### Apps and Packages
10+
11+
- `docs`: a [Next.js](https://nextjs.org/) app
12+
- `web`: another [Next.js](https://nextjs.org/) app
13+
- `ui`: a stub React component library shared by both `web` and `docs` applications
14+
- `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
15+
- `tsconfig`: `tsconfig.json`s used throughout the monorepo
16+
17+
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
18+
19+
### Utilities
20+
21+
This turborepo has some additional tools already setup for you:
22+
23+
- [TypeScript](https://www.typescriptlang.org/) for static type checking
24+
- [ESLint](https://eslint.org/) for code linting
25+
- [Prettier](https://prettier.io) for code formatting
26+
27+
### Build
28+
29+
To build all apps and packages, run the following command:
30+
31+
```
32+
cd my-turborepo
33+
yarn run build
34+
```
35+
36+
### Develop
37+
38+
To develop all apps and packages, run the following command:
39+
40+
```
41+
cd my-turborepo
42+
yarn run dev
43+
```
44+
45+
### Remote Caching
46+
47+
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.
48+
49+
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:
50+
51+
```
52+
cd my-turborepo
53+
npx turbo login
54+
```
55+
56+
This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).
57+
58+
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your turborepo:
59+
60+
```
61+
npx turbo link
62+
```
63+
64+
## Useful Links
65+
66+
Learn more about the power of Turborepo:
67+
68+
- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
69+
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
70+
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
71+
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
72+
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
73+
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)

apps/docs/.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: ["custom"],
4+
};

apps/docs/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## Getting Started
2+
3+
First, run the development server:
4+
5+
```bash
6+
yarn dev
7+
```
8+
9+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
10+
11+
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
12+
13+
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
14+
15+
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
16+
17+
## Learn More
18+
19+
To learn more about Next.js, take a look at the following resources:
20+
21+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
22+
- [Learn Next.js](https://nextjs.org/learn/foundations/about-nextjs) - an interactive Next.js tutorial.
23+
24+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
25+
26+
## Deploy on Vercel
27+
28+
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.
29+
30+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

apps/docs/next-env.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.

apps/docs/next.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
reactStrictMode: true,
3+
transpilePackages: ["ui"],
4+
};

apps/docs/package.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "docs",
3+
"version": "0.0.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev --port 3001",
7+
"build": "next build",
8+
"start": "next start",
9+
"lint": "next lint"
10+
},
11+
"dependencies": {
12+
"next": "^13.1.1",
13+
"react": "^18.2.0",
14+
"react-dom": "^18.2.0",
15+
"ui": "*"
16+
},
17+
"devDependencies": {
18+
"@babel/core": "^7.0.0",
19+
"eslint": "7.32.0",
20+
"eslint-config-custom": "*",
21+
"tsconfig": "*",
22+
"@types/node": "^17.0.12",
23+
"@types/react": "^18.0.22",
24+
"@types/react-dom": "^18.0.7",
25+
"typescript": "^4.5.3"
26+
}
27+
}

apps/docs/pages/index.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { Button } from "ui";
2+
3+
export default function Docs() {
4+
return (
5+
<div>
6+
<h1>Docs</h1>
7+
<Button />
8+
</div>
9+
);
10+
}

apps/docs/tsconfig.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": "tsconfig/nextjs.json",
3+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
4+
"exclude": ["node_modules"]
5+
}

0 commit comments

Comments
 (0)