Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eliasgcf/turborepo-next-vite-tailwind-shadcn
https://github.com/eliasgcf/turborepo-next-vite-tailwind-shadcn
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/eliasgcf/turborepo-next-vite-tailwind-shadcn
- Owner: EliasGcf
- Created: 2023-12-08T16:26:29.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2023-12-10T01:04:44.000Z (11 months ago)
- Last Synced: 2024-10-12T12:50:38.445Z (26 days ago)
- Language: TypeScript
- Size: 96.7 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Turborepo Tailwind CSS starter
This is an official starter Turborepo.
## Using this example
Run the following command:
```sh
npx create-turbo@latest -e with-tailwind
```## What's inside?
This Turborepo includes the following packages/apps:
### Apps and Packages
- `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
- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
- `@repo/typescript-config`: `tsconfig.json`s used throughout the monorepoEach package/app is 100% [TypeScript](https://www.typescriptlang.org/).
### Building packages/ui
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.
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.
For example, in [tailwind.config.js](packages/tailwind-config/tailwind.config.js):
```js
content: [
// app content
`src/**/*.{js,ts,jsx,tsx}`,
// include packages if not transpiling
"../../packages/**/*.{js,ts,jsx,tsx}",
],
```### Utilities
This Turborepo has some additional tools already setup for you:
- [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