@vidiun-ng/dev-workspace v2.4.1
Vidiun Dev Workspace
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 findlerna
the best tool that simplify complicated dev-op operation. We recommend you to trylerna
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
- Ensure you have node.js installed, version 7.0.0 or above.
- Ensure you have git installed
- Ensure you have npm installed, version 5.0.0 or above.
Setup your workspace
- create a folder to hold your packages (your workspace root folder).
- create
package.json
in your root folder by running the following command:
$ npm init -y
- add this tool to your folder in your root folder by running the following command:
$ npm install @vidiun-ng/dev-workspace
- 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.
- add the following to your
package.json
:
{
"scripts" : {
"vws" : "vws",
"setup" : "vws setup",
"build" : "vws run build",
"licenses" : "vws licenses",
"clean" : "vws clean"
}
}
- run setup command to build & symlink your repositories
$ npm run setup
Commands
init
setup
run
licenses
clean
5 years ago