typescript-mono-repo-template

Open in Github Open in Github Page Open Tag

A project template for building mono repos with TypeScript.

Usage

Follow these instructions to clone this template and start a new project with a clean Git history.

1. Clone and Checkout the Template

Clone the repository and replace YOUR_PROJECT_NAME with your desired project name. Then, navigate into the directory and check out the latest stable tag to ensure you have a clean starting point.

# Clone the template
git clone https://github.com/JamesRobertHugginsNgo/typescript-mono-repo-template.git YOUR_PROJECT_NAME

# Navigate into your new project's folder
cd YOUR_PROJECT_NAME

# Checkout the stable tag
git checkout 1.0.2

2. Prepare the Project

Remove the template’s Git history and reset the package.json file to begin your new project.

# Remove the old Git repository
# Choose the command based on your operating system:

# MacOS/Linux
rm -rf .git
rm package.json package-lock.json

# Windows
rmdir /s /q .git
del package.json package-lock.json

3. Reconfigure Your Project

Run these commands to generate a new package.json file and reinstall the core dependencies for your new project.

# Run these commands for all operating systems:
npm init -y
npm install --save-dev @types/node typescript
npm pkg set license="MIT"
npm pkg set scripts.build="tsc --build"
npm pkg set scripts.watch="tsc --watch"
npm pkg set type="module"