Download the extension at the VS Gallery or get the nightly build.
See the changelog for changes and roadmap.
A simple solution to installing JavaScript and CSS libraries into any project. It uses well established global content delivery networks that hosts thousands of the most popular libraries.
Because it uses these content delivery networks as data source, it allows the user to be in total control over where to install the packages and what files to install. The user is in complete control of what is added to the project.
Right-click any folder in your project and hit Add Client-Side Library...
This brings up the package installer dialog.
You can now search for the thousands of available packages.
When you find the right package, the version dropdown populates to the latest stable version of the package.
The tree view shows what files are available and will preselect the file(s) that it thinks you may want.
By checking this checkbox, a folder with the same name as the package will be created and all the package files will be added to that folder.
This option is checked by default.
A main difference between this extension and package managers is that a manifest file is not needed at all in order to install packages.
NuGet uses packages.config, Bower uses bower.json etc.
This extension uses an optional file called packman.json.
If you don't check the Save manifest file checkbox, it will just add the library files to the selected folder, but not keep a record of it anywhere. This is essentially the same as going to a library's website and manually downloading the files and copying them into your project.
It's important to note that library restore will not be possible without a manifest file.
The format of the manifest file is simple and easy to understand.
If you want to modify the manifest file manually, full Intellisense is provided for package names, versions and file names.
You only get Intellisense for file names if the version property exist and has an accurate value.
You can create custom libraries that will download files
at any URL you specify. To do that, open packman.json
and add a custom entry like so:
"my-custom-package":{
"path": "output/custom",
"urls": [
"http://example.com/file.js",
"http://example.com/file.min.js"
]
}
Then simply restore the libraries to download and add the files to your project.
It's very easy to restore libraries. Just right-click the packman.json manifest file and select Restore packages.
This will hydrate your project with the files from all the libraries listed in packman.json.
Library restore will also happen every time you save packman.json. This behavior can be disabled in the options dialog.
An options page is available in the Visual Studio options dialog.
From here you can set various settings including which provider to use - JsDelivr or Cdnjs.