Add readme file
This commit is contained in:
parent
beae3c44d8
commit
a2091dd391
89
README.md
89
README.md
|
|
@ -1,81 +1,38 @@
|
||||||
# Turborepo starter
|
# Dashboard Template Setup
|
||||||
|
|
||||||
This is an official starter Turborepo.
|
## Getting Started
|
||||||
|
|
||||||
## Using this example
|
This guide provides step-by-step instructions to set up the dashboard template from the repository for your development environment.
|
||||||
|
|
||||||
Run the following command:
|
### Prerequisites
|
||||||
|
|
||||||
```sh
|
- Git (Download from [git-scm.com](https://git-scm.com/))
|
||||||
npx create-turbo@latest
|
|
||||||
|
### 1. Clone the Repository
|
||||||
|
|
||||||
|
Clone the `v2` branch of the dashboard template repository and set the remote name to "template":
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone -b v2 --single-branch git@github.com:sianida26/dashboard-template.git --origin template
|
||||||
```
|
```
|
||||||
|
|
||||||
## What's inside?
|
### 2. Switch to Main Branch
|
||||||
|
|
||||||
This Turborepo includes the following packages/apps:
|
After cloning, switch to the main branch:
|
||||||
|
|
||||||
### Apps and Packages
|
```bash
|
||||||
|
cd dashboard-template
|
||||||
- `docs`: a [Next.js](https://nextjs.org/) app
|
git checkout main
|
||||||
- `web`: another [Next.js](https://nextjs.org/) app
|
|
||||||
- `@repo/ui`: a stub React component library shared by both `web` and `docs` applications
|
|
||||||
- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
|
|
||||||
- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo
|
|
||||||
|
|
||||||
Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).
|
|
||||||
|
|
||||||
### Utilities
|
|
||||||
|
|
||||||
This Turborepo has some additional tools already setup for you:
|
|
||||||
|
|
||||||
- [TypeScript](https://www.typescriptlang.org/) for static type checking
|
|
||||||
- [ESLint](https://eslint.org/) for code linting
|
|
||||||
- [Prettier](https://prettier.io) for code formatting
|
|
||||||
|
|
||||||
### Build
|
|
||||||
|
|
||||||
To build all apps and packages, run the following command:
|
|
||||||
|
|
||||||
```
|
|
||||||
cd my-turborepo
|
|
||||||
pnpm build
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Develop
|
### 3. Disable Push to Template Remote
|
||||||
|
|
||||||
To develop all apps and packages, run the following command:
|
Set the "template" remote to be unpushable to prevent accidental updates:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
cd my-turborepo
|
git remote set-url --push template no_push
|
||||||
pnpm dev
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Remote Caching
|
## Usage
|
||||||
|
|
||||||
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.
|
You're now ready to use the dashboard template. Begin your project modifications in the main branch. For further customizations, consult the Git documentation or raise an issue in the repository.
|
||||||
|
|
||||||
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:
|
|
||||||
|
|
||||||
```
|
|
||||||
cd my-turborepo
|
|
||||||
npx turbo login
|
|
||||||
```
|
|
||||||
|
|
||||||
This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).
|
|
||||||
|
|
||||||
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
|
|
||||||
|
|
||||||
```
|
|
||||||
npx turbo link
|
|
||||||
```
|
|
||||||
|
|
||||||
## Useful Links
|
|
||||||
|
|
||||||
Learn more about the power of Turborepo:
|
|
||||||
|
|
||||||
- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
|
|
||||||
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
|
|
||||||
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
|
|
||||||
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
|
|
||||||
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
|
|
||||||
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user