-
Notifications
You must be signed in to change notification settings - Fork 93
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
Using ?
tags in addPrefix
seems to drop all assets
#156
Comments
+1 |
This would be a great fix, the My workaround for now is the gulp.src('test/index.html')
.pipe(inject(gulp.src(['test/*.{js,css}']), {
addRootSlash: false,
transform: function (filepath) {
return '<?php echo stuff(); ?>/' + filepath;
}
}))
.pipe(gulp.dest('test/out/test-php')); |
I put in a pull request for this, but it's super-specific to php-code in the prefix. Tbh, that might not be a bad thing :) |
@humancatfood It might not seem bad atm, but the code that fixed #71 and #107 are directly related to causing this issue. I also put out a PR for this, but my implementation needs a major version bump which might not be wanted by the package author. Don't know if @klei has any opinions on where we should head from here? |
If it helps anyone else, this is what I'm currently using for adding the prefix for the Wordpress template directory for css, js & html files. Thanks for the transform workaround @humancatfood! +1
|
Hi,
I might have discovered a bug. I first thought it might be related to my personal setup, which has become rather big, but this small test-bed has the same results:
Test HTML document:
The first run will result in the files being injected as suspected, where the second run will not inject anything. Through trial & error, I managed to deduce that this problem occurs as soon as you insert a
?
into the prefix string.Edit; In case this might help:
The text was updated successfully, but these errors were encountered: