bhouston / template-typescript-monorepo

Template repo with the latest tech working together

Home Page:https://typescript-monorepo-demo.benhouston3d.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeScript + React App Mono Repository

This is a template for a monorepo that uses best practices for TypeScript, Web Services and React.

It is what @bhouston considers best practice in January 2024.

The end result

Screenshot 2024-01-09 at 4 53 45 PM

Features

  • Mono-repository using NPM workspaces
  • TypeScript for type safety
  • ES Modules for fast builds
  • NodeNext node resolution
  • React for UI
  • Both react and vanilla JS libraries
  • Command line, React app, and web server
  • Vite for Bundling, CSS Handling, Live Reloading.
  • Hot reload of React
  • Auto service restart for the web server
  • Lerna for managing the monorepo dependencies in parallel builds
  • Prettier for code formatting
  • ESLint for linting
  • Incremental and caching builds via NX.
  • VSCode will auto-format on save and paste.
  • Jest testing
  • Github action CI

Getting Started

  1. Clone this repository
  2. Run npm install

Tests

  1. Run npm run test to run all jest tests

Continuous Dev Build

  1. Run npm run watch to start the hot reload development server & build watchers

Optimized Production Build

  1. Run npm run build to build the source

Run the webserver (no reload)

  1. Run npx koa-server to start the webserver
  2. Open the link that appears in the console in your browser

Command Line

  1. Run npx cmdline-app to run the CLI example

About

Template repo with the latest tech working together

https://typescript-monorepo-demo.benhouston3d.com

License:MIT License


Languages

Language:TypeScript 60.2%Language:CSS 29.7%Language:JavaScript 8.7%Language:HTML 0.8%Language:Dockerfile 0.6%