I decided to create a library for Angular as a way to learn a bit more about it. I work every day with Angular but have never set up a project from scratch. I've never had to actually deal with an empty environment, create the backbones of a project, the first CSS classes and so on.
I also decided to do this on the currently latest version of Angular (14) to also learn what new it has to offer (I work with Angular 8 at work), so maybe my problem is just that it changed over time and I'm assuming things wrong.
That being said, here is my issue:
Angular documentation says I should create a workspace for working with libs if I want to use the lib without publishing it. Since I'm still not sure if I'll ever publish this, that's what I did. So I created a workspace called angular-14. It aparently also set up a git repo automatically, but I removed the .git and .gitignore because I plan on versioning each project separately:
Then, I created my library project under the projects
folder, which looks like this by default:
So far, so good. Now, lets create an application project that will use this library, and here comes the issue:
No angular.json
, package.json
or package-lock.json
. I was also expecting it to have a tsconfig.json
and not only tsconfig.app.json
.
Does that mean I'll have to rely on the files present in the workspace (and therefore I'm stuck and will have to version the whole workspace)? Or should I manually create these files?
I noticed it because WebStorm didn't set up the run/debug configuration automatically. ng-serve
is working as intended, though.
It also didn't create an e2e
folder, but that I assume is just that I forgot to add some parameter in the project creation. This is probably not going to be a product, so I will focus on learning just the library development thing for now.
Thank you very much