aspnet / LibraryManager

MIT License
456 stars 80 forks source link

Same library with different files to different directories in lib doesn't seem to work #597

Open Devnsyde opened 4 years ago

Devnsyde commented 4 years ago

Functional impact

Setting up libman.json with the json that repeats libraries seems to only run one time

Minimal repro steps

  1. Add the following JSON to your libman.json file in libraries:
    {
      "library": "angular-ui-bootstrap@2.5.6",
      "files": [
        "ui-bootstrap-csp.css",
        "ui-bootstrap-csp.min.css"
      ],
      "destination": "wwwroot/lib/angular-ui-bootstrap/dist/css/"
    },
    {
      "library": "angular-ui-bootstrap@2.5.6",
      "files": [
        "ui-bootstrap.js",
        "ui-bootstrap.min.js",
        "ui-bootstrap-tpls.js",
        "ui-bootstrap-tpls.min.js"
      ],
      "destination": "wwwroot/lib/angular-ui-bootstrap/dist/js/"
    }

Expected result

The JS files should install to the JS directory and the CSS files should install to the CSS directory.

Actual result

The JS library setting is running and installing the JS files but the CSS library never installs.

Further technical details

The library that I'd like to install includes all its files in one directory which is not organized, I'd like to organize them in a way that is consistent with many other well-known libraries such as font-awesome, and bootstrap

RobJohnston commented 4 years ago

Related to https://github.com/aspnet/LibraryManager/issues/407, needs a way to specify the destination for individual files.

alanta commented 2 years ago

Just ran into the exact same issue trying to put Bootstrap .scss files in a folder for pre-compilation and the .js into wwwroot. Only the last defined entry for a lib is executed.

jbarrineau06 commented 2 years ago

Same issue, trying to put fontawesome css/js files in their own folder, and the webfonts at the wwwroot level

Mike-Logit commented 6 months ago

Same issue. Need help with this. I want to have the font files from the formantic-ui client library to go in wwwroot/fonts and the js + css files to go in another directory outside of wwwroot to be handled by gulp tasks, but the last client library object specified in libman.json overrides the first object if the library is the same.

dstepanov25 commented 5 months ago

Same issue. Need to split css and js files by different folders