aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 123 forks source link

Manual removal of dependency from bower.json should delete package's folder #966

Open scottaddie opened 7 years ago

scottaddie commented 7 years ago

Manually removing a dependency from bower.json should delete the corresponding folder from the directory defined in .bowerrc (wwwroot/lib by default). The Manage Bower Packages dialog does do this. As a power user, I'd expect manually editing the bower.json file to have feature parity with the Manage Bower Packages dialog.

Here are the steps to reproduce:

  1. File --> New --> Project... --> ASP.NET Core Web Application (.NET Core)

  2. Select the Web Application template for ASP.NET Core 1.1

  3. Open bower.json, and add a reference to Font Awesome, and save to trigger the package installation. The bower.json file should now look as follows:

    {
    "name": "asp.net",
    "private": true,
    "dependencies": {
    "bootstrap": "3.3.7",
    "font-awesome": "4.7.0",
    "jquery": "2.2.0",
    "jquery-validation": "1.14.0",
    "jquery-validation-unobtrusive": "3.2.6"
    }
    }

    Notice that the wwwroot\lib\font-awesome folder now exists in Solution Explorer.

  4. Manually remove the Font Awesome dependency from bower.json, and save. Your bower.json file now looks like this:

    {
    "name": "asp.net",
    "private": true,
    "dependencies": {
    "bootstrap": "3.3.7",
    "jquery": "2.2.0",
    "jquery-validation": "1.14.0",
    "jquery-validation-unobtrusive": "3.2.6"
    }
    }

    Notice that the wwwroot\lib\font-awesome folder still exists:

bower_uninstall

mlorbetske commented 7 years ago

@jodavis @madskristensen thoughts?

madskristensen commented 7 years ago

It's on the backlog