-
Notifications
You must be signed in to change notification settings - Fork 90
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
base option not working as expected #208
Comments
I too cannot get the gulpfile.js: gulp.task('default', function() {
return gulp.src('src/client/*.html', { base: 'src' })
.pipe(useref({ base: 'client' }))
.pipe(gulpif('*.js', ngAnnotate()))
.pipe(gulpif('*.js', uglify()))
.pipe(gulpif('*.css', cleanCss()))
.pipe(gulp.dest('build'));
}); *.html: <!-- build:css css/style.css -->
<link rel="stylesheet" href="css/layout.css">
<link rel="stylesheet" href="css/overlay.css">
<!-- endbuild --> For example, I expect |
My hunch is that the base is being overwritten by the
|
+1 |
Unfortunately not working with me as well. Even the workaround does not work |
Same here, I am using Craft CMS and need the final concatenated script to output to my assets folder which is 3 directories up from the template files where the links to the scripts are, base does not appear to be working how I expected. |
Not working for me either - @asabhaney 's solution works, thanks! |
Thanks for this plugin, it's been very useful to me.
My understanding is that the
base
option provides a mechanism to output assets to the given directory. Perhaps it's just that I'm misunderstanding how the base option works.I've created a test repos that hopefully demonstrates the problem: https://github.com/MozMorris/gulp-useref-example
I set the base option like so:
HTML:
My expectation is that assets in my
static
folder get written todist/some/other/directory
with the final html looking like:The actual result is my assets are written to
dist
without the base option folder structure.The text was updated successfully, but these errors were encountered: