From 14ba30efcfeb4119d04f50c926ee8460dde7f8ae Mon Sep 17 00:00:00 2001 From: Mayank Kumar Chaudhari Date: Mon, 6 May 2024 11:33:18 +0530 Subject: [PATCH] Update contributing.md --- TODO.md | 4 +++ contributing.md | 66 ++++++++++++++++++++++++++----------------------- 2 files changed, 39 insertions(+), 31 deletions(-) diff --git a/TODO.md b/TODO.md index 28a8e317..da3d31f2 100644 --- a/TODO.md +++ b/TODO.md @@ -36,3 +36,7 @@ - [ ] Feel free to star this template, contribute, and/or sponsor the [`terbo-repo-template`](https://github.com/react18-tools/turbo-repo-template) project or my [other open-source work](https://github.com/sponsors/mayank1513) - [ ] You can also fork the [`terbo-repo-template`](https://github.com/react18-tools/turbo-repo-template/fork) and add your package to `scripts/featured.json` - If approved, your package will be automatically added to FEATURED.md and also published on the home page of this repo. + +
+ +

with 💖 by Mayank Kumar Chaudhari

diff --git a/contributing.md b/contributing.md index cb788e80..1bea7f3c 100644 --- a/contributing.md +++ b/contributing.md @@ -1,67 +1,69 @@ -# Contributing to React18 Loaders +# Contribution Guidelines -## What's inside? +## Overview -### Utilities +### Included Utilities -This Turborepo template includes pre-configured tools: +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](https://www.typescriptlang.org/) for static type checking - [ESLint](https://eslint.org/) for code linting - [Prettier](https://prettier.io) for code formatting -- Plop-based code generator for scaffolding new components -- Automatic rebranding of this template to match your repo name +- 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 includes the following packages/examples: +This TurboRepo comprises the following packages/examples, all written in [TypeScript](https://www.typescriptlang.org/): -- `nextjs`: a [Next.js](https://nextjs.org/) app -- `vite`: a [Vite.js](https://vitest.dev) app -- `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`) -- `tsconfig`: `tsconfig.json`s used throughout the monorepo +- `@example/nextjs`: a [Next.js](https://nextjs.org/) app +- `@example/vite`: a [Vite.js](https://vitest.dev) app +- `@example/remix`: a Remix app +- `@repo/eslint-config`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`) +- `@repo/typescript-config`: `tsconfig.json`s 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) -- `react18-loaders`: a React component library lives in `./lib` +## Automated File Generation -Each package/example is 100% [TypeScript](https://www.typescriptlang.org/). - -## Automatic file generation - -- Just run `yarn turbo gen` and follow the prompts to auto-generate your new component with a test file and dependency linking, adhering to best practices automatically. +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, run the following command: +To build all apps and packages, execute the following command: ```bash -cd my-turborepo pnpm build ``` -### Develop +### Development -To develop all apps and packages, run the following command: +For development of all apps and packages, run: ```bash -cd my-turborepo pnpm dev ``` -### Run unit tests +### Running Unit Tests -To run unit tests, run the following command: +To execute unit tests, use: ```bash -cd my-turborepo pnpm test ``` -### Linting and formatting +### Linting and Formatting -Before creating a PR, make sure lint is passing and also run the formatter to properly format the code. +Before creating a PR, ensure that linting passes and format the code properly with: ```bash -cd my-turborepo pnpm lint ``` @@ -71,9 +73,9 @@ and pnpm format ``` -## Useful Links +## Useful Resources -Learn more about Turborepo and Next.js: +Explore more about TurboRepo and Next.js through the following links: - [React and Next.js with TypeScript](https://www.udemy.com/course/react-and-next-js-with-typescript/?referralCode=7202184A1E57C3DCA8B2) - an interactive Next.js course. - [The Game of Chess with Next.js, React, and TypeScript](https://www.udemy.com/course/game-of-chess-with-nextjs-react-and-typescrypt/?referralCode=851A28F10B254A8523FE) @@ -84,7 +86,9 @@ Learn more about Turborepo and Next.js: - [Configuration Options](https://turbo.build/repo/docs/reference/configuration) - [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference) -> A quick tip: Delete all stale branches `git branch --merged main | grep -v '^[ *]*main$' | xargs git branch -d` +> Quick tip: Remove all stale branches with `git branch --merged main | grep -v '^[ *]*main$' | xargs git branch -d` + +> Consider enrolling in [our courses](https://mayank-chaudhari.vercel.app/courses) or [sponsoring](https://github.com/sponsors/mayank1513) our work.