question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for recursive directory search / patterns

See original GitHub issue

It doesn’t look like Smidge is supporting recursive directory search when building a bundle.

Folder Structure

-wwwroot
--lib
---jquery
----jquery.js

Setup

services.AddSmidge(config).Configure<Bundles>(bundles => {
        bundles.Create("jquery", WebFileType.Js, "~/lib*js");
});

jquery.js does not get found, regardless of debug mode when rendering. If I move jquery.js into the lib folder directly, it works.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
dazinatorcommented, Dec 19, 2016

Would be good to allow the glob / matcher that gets used to be a service perhaps. By default you could register one based on aspnet/filesystem pattern matcher, but this could be overridden if for example, you wanted to use more advanced glob syntax then it would be possible to override the default service with one based on dotnet.glob!

1reaction
dazinatorcommented, Dec 19, 2016

Shameless plug: i’'ve recently built a super fast Glob library, ( with benchmarks ) it’s usually more than 80℅ faster at matching compared to a compiled regex. It implements more of the Globbing spec than the out of box pattern matcher stuff in asp.net/filesystem. you can find it here: https://github.com/dazinator/DotNet.Glob feel free to take a look.

And here is an IFileProvider extension method I put together that will let you get search all files using a set of include/s exclude/s patterns, that leverage dotnet.glob for the matching: https://github.com/dazinator/Dazinator.AspNet.Extensions.FileProviders/blob/master/src/Dazinator.AspNet.Extensions.FileProviders/IFileProviderExtensions.cs#L69

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Searching for file in directories recursively
I have the following code to recursively search for files through a directory, which returns a list of all xml files to me....
Read more >
Recursively search a pattern/text only in the specified file ...
In the parent directory, you could use find and then run grep on only those files: find . -type f -iname "file.txt" -exec...
Read more >
How to use Glob() function to find files recursively in Python?
Python program to find files. # recursively using Python. import glob. # Returns a list of names in list files. print ( "Using...
Read more >
grep does not recurse for files with a specific extension
Grep's -r option (which is the same as the -R , --recursive , -d recurse and --directories=recurse options) takes a directory name (or ......
Read more >
Linux / UNIX Recursively Search All Files For A String
Explains how to use find and grep commands to recursively search and print matching lines or strings or words from a file under...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found