I have three different Angular cli projects (X, Y, Z). I want to make [X] as a parent project while I want to add Y and Z as npm package dependencies to X. That means [X] package.json will contain the dependencies of [Y] and [Z] as follows.
"dependencies": {
"@angular/common": "^4.0.0",
//.. other angular dependency
"y": "1.0.1",
"z": "1.0.3"
}
How to create those dependencies?
Note: Right now I have Y and Z as a lazy loaded folder inside X. Which I want to decouple as independent npm package.
You need to package your Y and Z projects and publish them on npm repository or you can develop it locally and use them via npm link... Here the Yeoman generator that can help you out.
https://github.com/jvandemo/generator-angular2-library