Open FranklinWhale opened 6 years ago
I stumbled upon this as well, but I wonder if this is by design. You can already cherrypick files to copy (though leaving that property out will implicitly copy all).
Possible approaches:
recurse
to explicitly toggle this behavior. This is quite intuitive, but not very flexible.subdirectories
property, maybe?files
with some glob-like syntax. Something like "files" : [ "**/*.*" ]
would recurse. "files": [ "*.*" ]
, however, would only pick up files from the immediate directory. Moreover, this allows for more complex scenarios: "files": [ "*.css", "images/*.png" ]
.A year later...
You can't even cherry pick files not in the package root. Pretty useless!
This seems to work for me, though:
{
"library": "node_modules/datatables.net-bs4/css/",
"destination": "wwwroot/lib/datatables.net-bs4/css/"
},
{
"library": "node_modules/datatables.net-bs4/js/",
"destination": "wwwroot/lib/datatables.net-bs4/js/"
}
@jimmylewis Is there any update?
this issue is blocking. Using LibMan, we are unable to copy over all files (including sub-directories) into the destination. Is it still not fixed?
@jimmylewis filesystem provider still doesn't handle recursive cases.
Functional impact
If
libraries.library
is specified withoutpackages.files
, it is expected all files and subdirectories are copied to thedestination
. Currently it is not the case, as only files are copied. As a result, all subdirectories of a library have to be listed as library inlibman.json
for them to be copied.Minimal repro steps
Prerequisites: .NET Core SDK, Node.js
npm install bootstrap
dotnet add package Microsoft.Web.LibraryManager.Build
libman.json
with the content below:dotnet build
Expected result
All files and subdirectories under node_modules/bootstrap/dist are copied to wwwroot/lib/bootstrap
Actual result
Only the .DS_Store file, which is under node_modules/bootstrap/dist, is coped