Regex for path to css/js files #978
-
Hello. Can I use regex to search for static files? something like this:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @grinchomsk, not currently. But that's an interesting idea! Would you look into it? Just a lil correction, what you're thinking of are glob patterns. I think to implement it, it should be enough to modify the contents of this if branch. Instead of constructing a single filepath_abs = os.path.join(comp_dir_abs, filepath We'd pass it first to filepath_abs_or_glob = os.path.join(comp_dir_abs, filepath)
matched_abs_filepaths = glob.glob(filepath_abs_or_glob)
for filepath_abs in matched_abs_filepaths:
... # Rest of the original logic We should also allow this only for the JS / CSS defined on the Then we should also update the And potentially update docs also for the |
Beta Was this translation helpful? Give feedback.
Hi @grinchomsk, not currently. But that's an interesting idea! Would you look into it?
Just a lil correction, what you're thinking of are glob patterns.
I think to implement it, it should be enough to modify the contents of this if branch.
Instead of constructing a single
filepath_abs
like so:We'd pass it first to
glob()
to expand any asterisks. Something like this:We should also allow this only for the JS / CSS defined on the
Media
class, so …