joshmeads / monorepo_base

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@joshmeads/base

Table of Contents

-----------------------------------------------------

About

A base monorepo setup for faster development

The monorepo workspaces consist of three sections:

  • apps/* - Contains frontend by default
  • packages/* - Contains ui by default
  • config/* - A space for configuration files to be extended from.
    • config-typescript
    • config-eslint: (Typescript is automatically injected if tsconfig.json is present)
      • config-eslint/react
      • config-eslint/node
      • config-eslint/cypress
      • config-eslint/ava
      • config-eslint/jest
    • config-prettier
    • config-snowpack:
      • config-snowpack/react
    • config-browserslist

Built with

-----------------------------------------------------

Getting Started

Prerequisites

  • node: >=16.0.0
  • yarn: npm i -g yarn

Install Dev Environment:

Clone and set upstream for later base updates

# Shallow Clone
npx degit https://github.com/joshmeads/monorepo_base project-name
# or
git clone -–depth 1 https://github.com/joshmeads/monorepo_base.git

# Add original upstream
git remote add upstream https://github.com/joshmeads/monorepo_base.git

# Set your local Main branch to be in sync
git pull upstream main
# or
git rebase upstream/main

# Update the main branch on origin
git push origin main # you may need -f if you rebased

Update against the upstream base

# Fetch new commits
git fetch upstream

# Checkout main
git checkout main

# Rebase against upstream
git rebase upstream/main

# Set your local Main branch to be in sync
git push origin main # you may need -f if you rebased

Install dependencies

  1. yarn to link all packages / dependencies
  2. (if using VSCode) Install Yarn Tools: yarn dlx @yarnpkg/pnpify --sdk vscode

-----------------------------------------------------

Usage

Application:

  • Start: yarn workspace <name> start
  • Build: yarn workspace <name> build

Components:

  • Start Storybook: yarn workspace <name> start

-----------------------------------------------------

Misc info

  • Yarn PNP (via yarn dlx @yarnpkg/pnpify --sdk vscode) requires the packages to be installed in the root package.json in order to fix the tooling
  • .vscode/settings.json contains files.exclude to hide items in the vscode sidebar. Remove/comment these if you need access to those files.

-----------------------------------------------------

License

MIT

About


Languages

Language:JavaScript 75.9%Language:TypeScript 19.0%Language:HTML 5.1%