libman.json


InterServer Web Hosting and VPS
Sony Playstation PS4 Pro Custom Build NVMe SSD Drive - Enclosure case and Crucial NVMe SSD
PS4 Pro Custom External SSD NVMe Drive

How I built a PS4 Pro Custom External SSD NVMe Drive...

NUC8i7BEH with memory
Intel NUC8I7BEH Review and Custom Build

This is my review of the Intel NUC8i7BEH and a summary of my build...

Card image cap
Asus M5A88-M EVO Review

This is my review of the Asus M5A88-M EVO motherboard...

Corsair Vengeance Blue 8GB (2x4GB) DDR3 PC3-12800C9 1600MHz Dual Channel Kit
Corsair Vengeance Blue Review

This is my review of the Corsair Vengeance Blue 8GB (2x4GB) DDR3 PC3-12800C9 1600MHz Dual Channel Kit memory...

Robotic Arm with USB PC Interface Review
Robotic Arm with USB PC Interface Review

This is my review of the Robotic Arm with USB PC Interface...

libman.json

Here we look at using libman.json in Visual Studio.

libman.json is a great little utility that seems to come with Visual Studio 2019, libman.json may have been out before, but I didn't come across it until I started developing with .NET Core

Although you need to know it's syntax to get started with it, it is quite simple and certainly makes getting hold of client site libraries appear to be more clear than Nuget, which I have found can be more complicated.

Basically, you just edit the libman.json file (it's json syntax), specify which libraries you would like, and where to put them, and then it will download them automatically for you. Now I have done it twice, I already prefer this for client-side libraries, over Nuget.

Probably the best feature about libman.json, is that you can specify which folder your downloaded client side files will be located, whereas with Nuget you would download them first, and then move them around afterwards.

Here is an example of using libman.json to download AngularJS 1.8.0:


{
  "version": "1.0",
  "defaultProvider": "cdnjs",
   "libraries": [
     {
       "library": "angular.js@1.8.0",
       "destination": "wwwroot/lib/bootstrap"
     }
   ]
}


Here is an example of using libman.json to download Bootstrap 4.4.1 and jQuery 3.5.1:


{
   "version": "1.0",
   "defaultProvider": "cdnjs",
   "libraries": [
     {
       "library": "twitter-bootstrap@4.4.1",
       "destination": "wwwroot/lib/bootstrap"
     },
     {
       "library": "jquery@3.5.1",
       "destination": "wwwroot/lib/jquery/"
     }
   ]
}


Sponsored Links
SolarSystem - AngularJS Demo
SolarSystem - Angular JS Demo

Check out my first Angular JS demo hosted in Azure, it helped win my first Angular contract. Put the sound on.