Skip to content

Latest commit

 

History

History
94 lines (64 loc) · 3.62 KB

contributing.md

File metadata and controls

94 lines (64 loc) · 3.62 KB

Contribution Guidelines

Overview

Included Utilities

This template is equipped with pre-configured tools to streamline your development process:

  • Monorepo setup powered by TurboRepo
    • TurboRepo is renowned for its efficient builds and caching mechanisms, minimizing unnecessary builds.
  • TypeScript for static type checking
  • ESLint for code linting
  • Prettier for code formatting
  • Plop-based code generator for effortlessly scaffolding new components
  • Automatic rebranding functionality for this template
  • Workflows facilitating testing, documentation, dependency updates, and deployment of your docs and packages
  • Build setup capable of creating appropriate CJS and ESM builds to support React 18 server and client component exports from the same library
  • Out-of-the-box support for SCSS modules for lib and packages/shared

Apps and Packages

This TurboRepo comprises the following packages/examples, all written in TypeScript:

  • @example/nextjs: a Next.js app
  • @example/vite: a Vite.js app
  • @repo/eslint-config: eslint configurations (includes eslint-config-next and eslint-config-prettier)
  • @repo/typescript-config: tsconfig.jsons used throughout the monorepo
  • @repo/jest-presets: Jest presets for unit testing
  • @repo/logger: A configurable shared logger utility
  • @repo/shared: An internal library of components utilized by the examples
  • react18-loaders: a React component library (The core package published to NPM)

Automated File Generation

Simply execute yarn turbo gen and follow the prompts to automatically generate your new component along with a test file and dependency linking, adhering to best practices.

Build

To build all apps and packages, execute the following command:

pnpm build

Development

For development of all apps and packages, run:

pnpm dev

Running Unit Tests

To execute unit tests, use:

pnpm test

Linting and Formatting

Before creating a PR, ensure that linting passes and format the code properly with:

pnpm lint

and

pnpm format

Useful Resources

Explore more about TurboRepo and Next.js through the following links:

Quick tip: Remove all stale branches with git branch --merged main | grep -v '^[ *]*main$' | xargs git branch -d

Consider enrolling in our courses or sponsoring our work.


with 💖 by Mayank Kumar Chaudhari