Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove an Angular library created with CLI (ng generate library)

To create a library in angular6 we use the following:

ng generate library my-lib

If we wish to remove the previously created library, what is the the command:

like image 368
st_clair_clarke Avatar asked May 08 '18 22:05

st_clair_clarke


People also ask

How do I remove a lib?

On a Fire tablet, Android device, or Chromebook In the OverDrive app, click or tap the icon in the top-left corner to open your Home menu. Select Manage libraries. Click or tap the trash icon next to the library you want to delete.

Where is the path of your custom angular library defined?

Where Is the Path of Your Custom Angular Library Defined? When you install a library package, the mapping is in the node_modules folder. When you build your own library, it has to be in the tsconfig path.


2 Answers

All you have to do is following steps :

  1. Delete the folder projects/my-lib.

  2. Go to the angular.json file and remove the "my-lib" object section contained in "projects".

  3. Go to tsconfig.json and remove "my-lib" object section from paths.

like image 110
Fernando Espinosa Avatar answered Oct 20 '22 16:10

Fernando Espinosa


If you are using Nx workspace 9.1.3 you can achieve that with remove workspace schematics plugin e.g. nx g @nrwl/workspace:remove <project-name>

like image 24
Jorge Ramirez Zamora Avatar answered Oct 20 '22 17:10

Jorge Ramirez Zamora