Library Manager (LibMan) is a lightweight, client-side library acquisition tool. LibMan downloads popular libraries and frameworks from the file system or from a content delivery network (CDN)
After creating a new ASP.NET Core Web App
, it will pull down assets into wwwroot\lib
, these are normally excluded from source control in .gitignore
by the lib
folder.
My process is then:
- Rename
wwwroot\lib
aswwwroot\lib2
- Create a
libman.json
file in the root, this can be manual or use Visual Studio but right clicking the solution and selectingManage Client-Side Libraries...
which createslibman.json
manually.
- Once the file exists, you can either edit it manually or using Visual Studio, in solution explorer, right-click the folder
wwwroot
and chooseAdd
>Client-Side Library
Inspect the contents of wwwroot\lib2
adding back the libs, examples
- bootstrap
- jquery
- jquery-validate
- jquery-validation-unobtrusive
- Pay attention to make sure the directories match, some go in
dist
folders.
My complete libman.json file is then
1 | { |
- Delete
lib2
and make sure the app still works as expected.