In VS Code (Visual Studio Code) you can create a single Workspace with 1 git repo but contain multiple projects. This lets you create library and app and contain them all under the same angular.json as well.
Here’s how.
Create a folder where you’d like to create the Workspace. In my example e:\ngLearn\CLIPlayGround
VS Code will appear. Open the Terminal Ctrl+Shift+`
Now, ask the CLI to create an Workspace, but with no default application:
ng new –createApplication=false
In the prompt give your workspace a name, like my-workspace
It’s take a few minutes to set up. If you open Windows Explorer you’ll see the new workspace made, but without any application inside:
Let’s now add a few applications by using the commands in the new folder
cd .\my-workspace\
ng g application
Run this twice and you’ll then notice there are 2 applications in your workspace: under a new Projects folder