-
Notifications
You must be signed in to change notification settings - Fork 83
Using LibMan CLI
Here's a handy cheat sheet for getting started with LibMan CLI
Before you can use LibMan from the CLI, you must first download and install the global tool via the dotnet CLI.
> dotnet tool install -g libman
Install library files into your folder/project.
> libman install jquery
Will install the latest version of of the library 'jquery' from the default provider.
Will prompt for default provider if there is no defaultProvider in libman.json.
Will prompt for destination if there is no defaultDestination in libman.json
> libman install [email protected]
Will install a specific version of the library from the default provider.
Note: Syntax is [LibraryName]@[LibraryVersion] for all providers except File System.
> libman install twitter-bootstrap --destination wwwroot/lib/bootstrap
Will install to the specified destination folder
To download and install all files defined in the libman.json, run the restore command
> libman restore
Will fail if there is a conflict with libraries. (ie. more than one library defined with the same library name.)
> libman uninstall jquery
Will remove jquery files from the folder they were restored to.
Will remove the library definition from libman.json
> libman update jquery
Will update to the latest version of the library.
> libman update jquery --to 2.2.0
Will update to a specific version of the library.
> libman clean
Will remove from your project all files that were restored.
> libman cache list
Will print a list of all libraries that exist in the cache - by library name only.
> libman cache list --files
Will print a list of all libraries that exist in the cache, listing all files in the library cache.
> libman cache clean
Will remove all files in the local machine's cache.
> libman cache clean --provider cdnjs
Will remove all files in the local machine's cache for the specified provider.