Skip to content

Commit

Permalink
sucessful merge
Browse files Browse the repository at this point in the history
  • Loading branch information
hossam1231 committed Oct 31, 2023
1 parent 74d8c9b commit 969c3eb
Show file tree
Hide file tree
Showing 336 changed files with 6,241 additions and 40,715 deletions.
74 changes: 22 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Turborepo starter
# Turborepo Tailwind CSS starter

This is an official starter Turborepo.

Expand All @@ -7,7 +7,7 @@ This is an official starter Turborepo.
Run the following command:

```sh
npx create-turbo@latest
npx create-turbo@latest -e with-tailwind
```

## What's inside?
Expand All @@ -16,66 +16,36 @@ This Turborepo includes the following packages/apps:

### Apps and Packages

- `docs`: a [Next.js](https://nextjs.org/) app
- `web`: another [Next.js](https://nextjs.org/) app
- `ui`: a stub React component library shared by both `web` and `docs` applications
- `docs`: a [Next.js](https://nextjs.org/) app with [Tailwind CSS](https://tailwindcss.com/)
- `web`: another [Next.js](https://nextjs.org/) app with [Tailwind CSS](https://tailwindcss.com/)
- `ui`: a stub React component library with [Tailwind CSS](https://tailwindcss.com/) shared by both `web` and `docs` applications
- `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
- `tsconfig`: `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

To develop all apps and packages, run the following command:
### Building packages/ui

```
cd my-turborepo
pnpm dev
```

### Remote Caching

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.

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 example is setup to build `packages/ui` and output the transpiled source and compiled styles to `dist/`. This was chosen to make sharing one `tailwind.config.js` as easy as possible, and to ensure only the CSS that is used by the current application and its dependencies is generated.

This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).
Another option is to consume `packages/ui` directly from source without building. If using this option, you will need to update your `tailwind.config.js` to be aware of your package locations, so it can find all usages of the `tailwindcss` class names.

Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
For example, in [tailwind.config.js](packages/tailwind-config/tailwind.config.js):

```
npx turbo link
```js
content: [
// app content
`src/**/*.{js,ts,jsx,tsx}`,
// include packages if not transpiling
"../../packages/**/*.{js,ts,jsx,tsx}",
],
```

## Useful Links
### Utilities

Learn more about the power of Turborepo:
This Turborepo has some additional tools already setup for you:

- [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)
- [Tailwind CSS](https://tailwindcss.com/) for styles
- [TypeScript](https://www.typescriptlang.org/) for static type checking
- [ESLint](https://eslint.org/) for code linting
- [Prettier](https://prettier.io) for code formatting
5 changes: 3 additions & 2 deletions apps/web/src/app/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ export default function Example() {
</div>
{/* uncomment soon */}
{/* CTA section */}
<EmailRegister />

{/* <div className="relative mt-24 sm:mt-32 sm:py-16">
<div aria-hidden="true" className="hidden sm:block">
<div className="absolute inset-y-0 left-0 w-1/2 rounded-r-3xl bg-gray-50" />
Expand Down Expand Up @@ -649,7 +649,7 @@ export default function Example() {
</div>
</div>
</div> */}
</main>
</main>{" "}
</div>

<main>
Expand All @@ -658,6 +658,7 @@ export default function Example() {
{/* Feature section */}
<div className="pt-20 bg-white">
<div className="mx-auto max-w-7xl px-6 lg:px-8">
<EmailRegister />
<div className="mx-auto max-w-2xl sm:text-center">
<h2 className="sm:pt-10 text-base font-semibold leading-7 text-indigo-500">
Everything you need
Expand Down
1 change: 0 additions & 1 deletion apps/web/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module.exports = {
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
"./node_modules/ui/src/*.{js,ts,jsx,tsx}", // Ui module
],
theme: {
extend: {
Expand Down
3 changes: 0 additions & 3 deletions docs/.eslintrc.json

This file was deleted.

129 changes: 0 additions & 129 deletions docs/LICENSE.md

This file was deleted.

35 changes: 0 additions & 35 deletions docs/README.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/next.config.js

This file was deleted.

Loading

0 comments on commit 969c3eb

Please sign in to comment.