@kontorol-ng/dev-workspace
v2.4.2
Published
Kontorol internal tool used to setup Kontorol applications development workspace
Downloads
4
Readme
Kontorol Dev Workspace
Tool for managing JavaScript projects with multiple packages.
About
Our code base for kmc-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.
Kontorol 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 Kontorol applications development and is not suppose to be used for other projects.
Getting Started
Prerequisites
- [x] Ensure you have node.js installed, version 7.0.0 or above.
- [x] Ensure you have git installed
- [x] 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 @kontorol-ng/dev-workspace
- create file
kontorol-ws.json
in your root folder with the following format:
{
"version" : "2.0.0",
"repositories": [
{ "origin" : "github", "uri": "https://github.com/kontorol/kontorol-ng.git"},
{ "origin" : "github", "uri": "https://github.com/kontorol/kontorol-ng-mc-theme.git"},
{ "origin" : "github", "uri": "https://github.com/kontorol/kmc-ng.git"}
],
"licenses" : {
"ignoreList" : [
"kontorol-typescript-client"
]
}
}
Notes:
- you should modify repositories property to hold a list of relevant repositories to your kontorol project ordering them by the dependency constraints.
- the sample above will setup your workspace to develop kmc-ng application.
- add the following to your
package.json
:
{
"scripts" : {
"kws" : "kws",
"setup" : "kws setup",
"build" : "kws run build",
"licenses" : "kws licenses",
"clean" : "kws clean"
}
}
- run setup command to build & symlink your repositories
$ npm run setup