Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make glob expansion respect rooted paths #207

Merged
merged 1 commit into from
Dec 7, 2021
Merged

Make glob expansion respect rooted paths #207

merged 1 commit into from
Dec 7, 2021

Conversation

goric
Copy link
Contributor

@goric goric commented Dec 7, 2021

Fixes #136, fixes #199. See also discussion in #118.

As suggested here, this change checks whether the source file glob has a '/' prefix and if so, prepends it to the files matched in ExpandGlob.

Given this setup:

pipeline.AddCssBundle("/css/bundle.css", "css/*.css", "/morecss/**/*.css");

Current markup (paths are always relative):

<link href="css/a.css" rel="stylesheet">
<link href="css/b.css" rel="stylesheet">
<link href="morecss/c.css" rel="stylesheet">
<link href="morecss/foo/d.css" rel="stylesheet">

Markup with this change (paths follow the source pattern):

<link href="css/a.css" rel="stylesheet">
<link href="css/b.css" rel="stylesheet">
<link href="/morecss/c.css" rel="stylesheet">
<link href="/morecss/foo/d.css" rel="stylesheet">

@madskristensen madskristensen merged commit 618a92e into ligershark:master Dec 7, 2021
@madskristensen
Copy link
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants