Skip to content

Commit 85ffb9f

Browse files
committed
Initial commit from Create Turborepo
0 parents  commit 85ffb9f

32 files changed

+2814
-0
lines changed

Diff for: .eslintrc.js

+10
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+
};

Diff for: .gitignore

+33
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

Diff for: README.md

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Turborepo starter
2+
3+
This is an official pnpm starter turborepo.
4+
5+
## What's inside?
6+
7+
This turborepo uses [pnpm](https://pnpm.io) 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+
pnpm 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+
pnpm run dev
43+
```
44+
45+
### Remote Caching
46+
47+
Turborepo can use a technique known as [Remote Caching](https://turborepo.org/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+
pnpm dlx 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+
pnpm dlx turbo link
62+
```
63+
64+
## Useful Links
65+
66+
Learn more about the power of Turborepo:
67+
68+
- [Pipelines](https://turborepo.org/docs/core-concepts/pipelines)
69+
- [Caching](https://turborepo.org/docs/core-concepts/caching)
70+
- [Remote Caching](https://turborepo.org/docs/core-concepts/remote-caching)
71+
- [Scoped Tasks](https://turborepo.org/docs/core-concepts/scopes)
72+
- [Configuration Options](https://turborepo.org/docs/reference/configuration)
73+
- [CLI Usage](https://turborepo.org/docs/reference/command-line-reference)

Diff for: apps/docs/.eslintrc.js

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

Diff for: apps/docs/README.md

+30
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) - 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.

Diff for: apps/docs/next-env.d.ts

+5
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.

Diff for: apps/docs/next.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const withTM = require("next-transpile-modules")(["ui"]);
2+
3+
module.exports = withTM({
4+
reactStrictMode: true,
5+
});

Diff for: apps/docs/package.json

+27
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": "12.3.0",
13+
"react": "18.2.0",
14+
"react-dom": "18.2.0",
15+
"ui": "workspace:*"
16+
},
17+
"devDependencies": {
18+
"@babel/core": "^7.0.0",
19+
"eslint-config-custom": "workspace:*",
20+
"eslint": "7.32.0",
21+
"next-transpile-modules": "9.0.0",
22+
"tsconfig": "workspace:*",
23+
"@types/node": "^17.0.12",
24+
"@types/react": "18.0.17",
25+
"typescript": "^4.5.3"
26+
}
27+
}

Diff for: apps/docs/pages/index.tsx

+10
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+
}

Diff for: apps/docs/tsconfig.json

+5
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+
}

Diff for: apps/web/.eslintrc.js

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

Diff for: apps/web/README.md

+30
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) - 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.

Diff for: apps/web/next-env.d.ts

+5
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.

Diff for: apps/web/next.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const withTM = require("next-transpile-modules")(["ui"]);
2+
3+
module.exports = withTM({
4+
reactStrictMode: true,
5+
});

Diff for: apps/web/package.json

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

Diff for: apps/web/pages/index.tsx

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

Diff for: apps/web/tsconfig.json

+5
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+
}

Diff for: package.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "podkit",
3+
"version": "0.0.0",
4+
"private": true,
5+
"workspaces": [
6+
"apps/*",
7+
"packages/*"
8+
],
9+
"scripts": {
10+
"build": "turbo run build",
11+
"dev": "turbo run dev --parallel",
12+
"lint": "turbo run lint",
13+
"format": "prettier --write \"**/*.{ts,tsx,md}\""
14+
},
15+
"devDependencies": {
16+
"eslint-config-custom": "workspace:*",
17+
"prettier": "latest",
18+
"turbo": "latest"
19+
},
20+
"engines": {
21+
"node": ">=14.0.0"
22+
},
23+
"dependencies": {},
24+
"packageManager": "[email protected]"
25+
}

Diff for: packages/eslint-config-custom/index.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
extends: ["next", "turbo", "prettier"],
3+
rules: {
4+
"@next/next/no-html-link-for-pages": "off",
5+
"react/jsx-key": "off",
6+
},
7+
};

Diff for: packages/eslint-config-custom/package.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "eslint-config-custom",
3+
"version": "0.0.0",
4+
"main": "index.js",
5+
"license": "MIT",
6+
"dependencies": {
7+
"eslint": "^7.23.0",
8+
"eslint-config-next": "^12.0.8",
9+
"eslint-config-prettier": "^8.3.0",
10+
"eslint-plugin-react": "7.31.8",
11+
"eslint-config-turbo": "latest"
12+
},
13+
"devDependencies": {
14+
"typescript": "^4.7.4"
15+
},
16+
"publishConfig": {
17+
"access": "public"
18+
}
19+
}

Diff for: packages/tsconfig/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `tsconfig`
2+
3+
These are base shared `tsconfig.json`s from which all other `tsconfig.json`'s inherit from.

Diff for: packages/tsconfig/base.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "https://json.schemastore.org/tsconfig",
3+
"display": "Default",
4+
"compilerOptions": {
5+
"composite": false,
6+
"declaration": true,
7+
"declarationMap": true,
8+
"esModuleInterop": true,
9+
"forceConsistentCasingInFileNames": true,
10+
"inlineSources": false,
11+
"isolatedModules": true,
12+
"moduleResolution": "node",
13+
"noUnusedLocals": false,
14+
"noUnusedParameters": false,
15+
"preserveWatchOutput": true,
16+
"skipLibCheck": true,
17+
"strict": true
18+
},
19+
"exclude": ["node_modules"]
20+
}

0 commit comments

Comments
 (0)