|
1 | | -# Turborepo starter |
| 1 | +<h1 align="center"> |
| 2 | + <br> |
| 3 | + Front-end Monorepo Template |
| 4 | + <br> |
| 5 | +</h1> |
2 | 6 |
|
3 | | -This is an official starter Turborepo. |
| 7 | +<h4 align="center">A typescript monorepo template for Front-End projects</h4> |
4 | 8 |
|
5 | | -## Using this example |
| 9 | +## Installation |
6 | 10 |
|
7 | | -Run the following command: |
| 11 | +```bash |
| 12 | +# Clone this repository |
| 13 | +$ git clone --depth 1 --single-branch https://github.com/mlacosta/frontend-monorepo-template your-project-name |
8 | 14 |
|
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 | | -- `@repo/ui`: a stub React component library shared by both `web` and `docs` applications |
22 | | -- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`) |
23 | | -- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepo |
24 | | - |
25 | | -Each package/app is 100% [TypeScript](https://www.typescriptlang.org/). |
| 15 | +# Go into the repository |
| 16 | +$ cd your-project-name |
26 | 17 |
|
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 |
| 18 | +# Install dependencies |
| 19 | +$ yarn install |
42 | 20 | ``` |
43 | 21 |
|
44 | | -### Develop |
| 22 | +## How to use |
45 | 23 |
|
46 | | -To develop all apps and packages, run the following command: |
| 24 | +```bash |
| 25 | +# Run a package script |
| 26 | +$ yarn workspace @<your-project-name>/<package-name> <your-command> |
47 | 27 |
|
| 28 | +# Run storybook |
| 29 | +$ yarn storybook:run |
48 | 30 | ``` |
49 | | -cd my-turborepo |
50 | | -pnpm dev |
51 | | -``` |
52 | | - |
53 | | -### Remote Caching |
54 | | - |
55 | | -> [!TIP] |
56 | | -> Vercel Remote Cache is free for all plans. Get started today at [vercel.com](https://vercel.com/signup?/signup?utm_source=remote-cache-sdk&utm_campaign=free_remote_cache). |
57 | 31 |
|
58 | | -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. |
| 32 | +## Packages |
59 | 33 |
|
60 | | -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?utm_source=turborepo-examples), then enter the following commands: |
61 | | - |
62 | | -``` |
63 | | -cd my-turborepo |
64 | | -npx turbo login |
65 | | -``` |
66 | | - |
67 | | -This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview). |
68 | | - |
69 | | -Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo: |
70 | | - |
71 | | -``` |
72 | | -npx turbo link |
73 | | -``` |
| 34 | +This repo uses the following open source packages: |
74 | 35 |
|
75 | | -## Useful Links |
| 36 | +- [@swc/jest](https://swc.rs/) |
| 37 | +- [Dependabot](https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically) |
| 38 | +- [Husky](https://typicode.github.io/husky) |
| 39 | +- [Material UI](https://mui.com/) |
| 40 | +- [Next.js](https://nextjs.org) |
| 41 | +- [Prettier](https://www.npmjs.com/package/prettier) |
| 42 | +- [Storybook](https://storybook.js.org/) |
| 43 | +- [Turborepo](https://turbo.build/) |
76 | 44 |
|
77 | | -Learn more about the power of Turborepo: |
| 45 | +## How to contribute |
78 | 46 |
|
79 | | -- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks) |
80 | | -- [Caching](https://turbo.build/repo/docs/core-concepts/caching) |
81 | | -- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) |
82 | | -- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering) |
83 | | -- [Configuration Options](https://turbo.build/repo/docs/reference/configuration) |
84 | | -- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference) |
| 47 | +1. Fork the Project |
| 48 | +2. Create your Feature Branch (`git checkout -b feature/newFeature`) |
| 49 | +3. Commit your Changes (`git commit -m 'Add some newFeature'`) |
| 50 | +4. Push to the Branch (`git push origin feature/newFeature`) |
| 51 | +5. Open a Pull Request |
0 commit comments