Thanks to visit codestin.com
Credit goes to github.com

Skip to content

andersonbarutti/br-digital

Repository files navigation

Features

  • ⚛️ Create React App 3 (React 17)
  • 🐈 Yarn Workspaces
  • 🐉 Lerna 3
  • ✨ Host Multiple CRA Apps, Component Libraries & Storybooks in one Monorepo
  • 🔥 Hot Reload all Apps, Components & Storybooks
  • 👨‍🔬 Test all workspaces with Eslint & Jest using one command

Contents

Setup

Pre-Requisites

  • Git >2.25.0
  • Yarn >1.13.0
  • Node >11.14.0

Installation

git clone this-repo
yarn

Adding workspace dependencies

yarn workspace <workspace_name> <command>

This will run the chosen Yarn command in the selected workspace.

Example:

yarn workspace my-app add react-router-dom --dev

This will add react-router-dom as dependencies in your packages/my-app/package.json. To remove dependency use remove instead of add

Adding root dependencies

yarn add <dependency_name> -W

Make it explicit by running with the -W flag (or --ignore-workspace-root-check)

Usage

Starting Project in Workspace

From your project root type start command for desired app

yarn workspace @project/portal start

All available start scripts

"scripts": {
    "start:portal": "yarn workspace @project/portal start",
    "start:storybook": "yarn workspace @project/storybook storybook",
    ...
  }

Starting The Storybook

yarn start:storybook

Linting and Testing

yarn workspace <workspace-root> test

Commitlint

Common types according to commitlint-config-conventional (based on the the Angular convention) can be:

  • build
  • ci
  • chore
  • docs
  • feat
  • fix
  • perf
  • refactor
  • revert
  • style
  • test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •