2.4.1 • Published 5 years ago

@vidiun-ng/dev-workspace v2.4.1

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

Vidiun Dev Workspace

Gitter chat npm version

Tool for managing JavaScript projects with multiple packages.

About

Our code base for vmc-ng and tvm-ng is organized into multiple packages/repositories. However, making changes across many repositories is messy.

For monorepos there is a great tool named lerna that optimizes the workflow around managing multi-package repositories with git and npm.

But in our case with have a mix of:

  • single package repo.
  • single application repo.
  • multiple packages in monorepo.

    Unfortunately lerna only support monorepo so we cannot use it as-is.

    To overcome this issue we created this tool.

    Vidiun dev workspace package is inspired deeply from lerna tool. We find lerna the best tool that simplify complicated dev-op operation. We recommend you to try lerna for your own projects.

Who should use this tool

This tool was created for Vidiun applications development and is not suppose to be used for other projects.

Getting Started

Prerequisites

Setup your workspace

  1. create a folder to hold your packages (your workspace root folder).
  2. create package.json in your root folder by running the following command:
 $ npm init -y
  1. add this tool to your folder in your root folder by running the following command:
$ npm install @vidiun-ng/dev-workspace
  1. create file vidiun-ws.json in your root folder with the following format:
 {
   "version" : "2.0.0",
   "repositories": [
     { "origin" : "github", "uri": "https://github.com/vidiun/vidiun-ng.git"},
     { "origin" : "github", "uri": "https://github.com/vidiun/vidiun-ng-mc-theme.git"},
     { "origin" : "github", "uri": "https://github.com/vidiun/vmc-ng.git"}
   ],
   "licenses" : {
     "ignoreList" : [      
       "vidiun-typescript-client"
     ]
   }
 }

Notes:

  • you should modify repositories property to hold a list of relevant repositories to your vidiun project ordering them by the dependency constraints.
  • the sample above will setup your workspace to develop vmc-ng application.

  1. add the following to your package.json:
{  
  "scripts" : {
    "vws" : "vws",
    "setup" : "vws setup",
    "build" : "vws run build",
    "licenses" : "vws licenses",
    "clean" : "vws clean"
  }
}
  1. run setup command to build & symlink your repositories
$ npm run setup

Commands

init

setup

run

licenses

clean