Elixir rev-manifest Windows Issues
Windows 8.1 here,
So I'm having trouble with elixir outputting backslashes in my versioned/built asset paths beca use of what I assume to be Node's path builder to concatenate directories using the native directory separator. So I'm wanting to have a simple gulp task that replaces the \ (or \\) in the public/build/rev-manifest.json with forward slashes - seems like the best way to solve this problem to me? Maybe I'm doing something dumb, which is entirely possible as I'm brand new to gulp and task runners in general.
Anyways, I'd love some assistance or guidance on this. I'm currently extending elixir with a simple fixRevManifest function that uses gulp-replace for replacing as specified above. The problem seems to be with some kind of concurrency issue as sometimes it works when outputting to a different file and never works when outputting/overwriting the original rev-manifest.json file.
var gulp = require('gulp');
var elixir = require('laravel-elixir');
var replace = require('gulp-replace');
elixir.extend('fixRevManifest', function(src, output) {
gulp.task('fix-rev-manifest', function() {
return gulp.src('./public/build/rev-manifest.json')
.pipe(replace(/\\\\/g, '/'))
.pipe(gulp.dest("./public/build/actual"));
});
this.registerWatcher('fix-rev-manifest');
return this.queueTask('fix-rev-manifest');
});
elixir(function(mix) {
mix
.sass("main.scss")
.styles(["css/main.css"])
.routes()
.events()
.version("css/all.min.css")
.fixRevManifest()
;
});
Appreciate any and all help. Thanks!
Please or to participate in this conversation.