Home
Softono
design-system-template

design-system-template

Open source TypeScript
195
Stars
14
Forks
2
Issues
1
Watchers
6 months
Last Commit

About design-system-template

# 🌱 Turborepo + TailwindCSS + Storybook ## What's inside? This Turborepo includes the following packages/apps: ### Apps and Packages - `workshop`: a Storybook app with the `ui` package imported - `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 with [shadcn-ui](https://github.com/shadcn/ui) already included. - `ui/eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`) - `ui/tailwind-config`: reusable tailwind configuration - `ui/tsconfig`: `tsconfig.json`s used throughout the monorepo Each 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 `dis ...

Platforms

Web Self-hosted

Languages

TypeScript

Links

🌱 Turborepo + TailwindCSS + Storybook

What's inside?

This Turborepo includes the following packages/apps:

Apps and Packages

  • workshop: a Storybook app with the ui package imported
  • docs: a Next.js app with Tailwind CSS
  • web: another Next.js app with Tailwind CSS
  • ui: a stub React component library with Tailwind CSS shared by both web and docs applications with shadcn-ui already included.
  • ui/eslint-config-custom: eslint configurations (includes eslint-config-next and eslint-config-prettier)
  • ui/tailwind-config: reusable tailwind configuration
  • ui/tsconfig: tsconfig.jsons used throughout the monorepo

Each package/app is 100% TypeScript.

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:

  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:

Using this example

Run the following command:

npx degit https://github.com/arevalolance/design-system-template.git design-system-template
cd design-system-template
pnpm install
git init . && git add . && git commit -m "Init"