@rxdi/monorepo

0.7.135 • Public • Published

@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"
      }
    }
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @rxdi/monorepo

Weekly Downloads

1

Version

0.7.135

License

MIT

Unpacked Size

25.4 kB

Total Files

3

Last publish

Collaborators

  • rxdi