1
votes

I am new at angular library project.

I hava created an angular project and a library in this project. The folder structure is like following:

  • mt-proj

    • projects
      • mt-lib
  • src

So I want to push my project github and publish the library package to npmjs server.

  1. So should I push all of my project to github, or only libary?
  2. Should I seperately package only library project or all project?
1

1 Answers

0
votes

A few things to keep in mind.

  1. If you are just using it for yourself, you don't have to make it public (I know a lot of tuts out there tell you to publish it to NPM, but if it's just an internal library it does not have to be public to get it included in your application build fwiw). You can keep it in your Angular Workspace as a private library and still have your projects include it in the build.
  2. Your library should be able to run without your project (i.e. I should be able to add your library to a fresh install of angular on my machine without issues).
  3. Package your library independently of your application project.