LibraryManager icon indicating copy to clipboard operation
LibraryManager copied to clipboard

Request: Destination path pattern

Open TristanApc opened this issue 6 years ago • 2 comments
trafficstars

It would be incredibly useful to support some kind of pattern for the destination path. This would result in less error prone writing of libman.json and could make the migration to LibraryManager faster. In the context that I just performed a migration from Bower and most of the libraries that was in used in the project had a common, yet unique destination pattern.

For example, if you have dozens of libraries that you each want to put in a path of the following format:

wwwroot/lib/{nameOfLibrary}/dist at the moment you have to write the destination for every libraries since you can't use the defaultDestination as every destination are unique.

Minimal repro steps

libman.json with the following contents.

{
  "version": "1.0",
  "defaultProvider": "cdnjs",
  "destinationPattern": "wwwroot/lib/{library}/dist/"
  "libraries": [
    {
      "destination": "wwwroot/lib/eonasdan-bootstrap-datetimepicke/build/"
      "library": "[email protected]"
    },
    {
        "library": "[email protected]"
    }
  ]
}

Expected result

A destination of the following form:

wwwroot/
     lib/
          eonasdan-bootstrap-datetimepicker/
               build/
                    ......

          jquery/
               dist/
                    ......

TristanApc avatar Feb 01 '19 13:02 TristanApc

Duplicate of #57 , but this has a better description.

RobJohnston avatar Aug 27 '20 01:08 RobJohnston

Any progress on this. Seems like a pretty basic feature to implement. Having all the scripts and content from libraries dumped in the same path will surely lead to naming conflicts besides looking like a big mess.

Is this tool still in active development???

CodeChief avatar Aug 10 '21 10:08 CodeChief