I'm trying to change a task from my gulpfile to create a rev manifest to be used in another moment. After this code work, I will add gulp-sourcemap to create some sourcemaps. But, this simple thing need to work first.
The objective is concatenate some scripts that are in scripts folder and inside a scripts subfolder (like 'c.js'), apply rev in this new script, vendor.js, and then fullfill the rev manifest to be used on another task.
I'm not a expert in Node.js or Gulp. It's de very first time I try to do this. So, it would be a stupid thing I forgot.
Here is my code (modified to look like an example) and thanks in advance
var vendorJs = ['scripts/a.js','scripts/b.js','scripts/anotherFolder/c.js'];
gulp.task("concat-vendor-js", function () {
return gulp.src(vendorJs)
.pipe(concat('vendor.js'))
.pipe(uglify())
.pipe(rev())
.pipe(gulp.dest('dist/Scripts'))
.pipe(rev.manifest())
.pipe(gulp.dest('dist'));
}
I'm getting this on my rev-manifest.json:
{
"/vendor.js": "/vendor-66687d0f7d.js"
}
But it should be like this:
{
"Scripts/vendor.js": "Scripts/vendor-66687d0f7d.js"
}