Skip to content
/ monorepo Public

Simple Monorepo command line interface for typescript without extra dependencies

Notifications You must be signed in to change notification settings

rxdi/monorepo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@rxdi/monorepo

Create easy monorepo with typescript

Features

  • No dependencies
  • Maintain monorepo with ease
  • Created for Typescript
  • 2.93 KB bundle

Installation

npm i -g @rxdi/monorepo

Usage

Create Empty monorepo

repo create

Following structure will be created

--root
   -src
     -@apps
     -@lib
     -@shared

Create library module

repo lib 'lib-name'

Will create library empty module inside root/src/@lib

Create shared module

repo shared 'lib-name'

Will create shared empty module inside root/src/@shared

Compile monorepo

repo compile

Watch mode

repo compile --watch

Start all stacks

repo run

Start specific stack

repo run frontend

Configuration

repo.json is default file You can specify more complex runner stacks by passing -c argument with path to custom json file like so: repo run frontend -c ./my-custom.json or running whole stack repo run -c ./my-custom.json

{
  "stacks": {
    "frontend": {
      "options": {
        "cwd": "./src/@apps/frontend/",
        "depends": ["gateway"],
        "signal": "Built in"
      },
      "commands": {
        "clean": "rm -rf .cache",
        "link": "gapi daemon link graphql",
        "run": "npm start"
      }
    },
    "api": {
      "options": {
        "signal": "SIGNAL_MAIN_API_STARTED",
        "cwd": "./src/@apps/api/"
      },
      "commands": {
        "clean": "rm -rf .cache",
        "link": "gapi daemon link graphql",
        "run": "npm start"
      }
    },
    "gateway": {
      "options": {
        "signal": "SIGNAL_GATEWAY_STARTED",
        "depends": ["api", "vscode-cloud"],
        "cwd": "./src/@apps/gateway/"
      },
      "commands": {
        "clean": "rm -rf .cache",
        "link": "gapi daemon link graphql",
        "run": "npm start"
      }
    },
    "vscode-cloud": {
      "options": {
        "signal": "SIGNAL_VS_CODE_STARTED",
        "cwd": "./src/@apps/vscode-cloud/"
      },
      "commands": {
        "clean": "rm -rf .cache",
        "link": "gapi daemon link graphql",
        "run": "npm start"
      }
    },
    "compile": {
      "options": {
        "cwd": ".",
        "depends": ["frontend"]
      },
      "commands": {
        "compile": "repo compile --watch"
      }
    }
  }
}

About

Simple Monorepo command line interface for typescript without extra dependencies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published