let's say I want to collect several files, in my case all the files are in the same directory (jquery), but in the project the files for some reason will be taken from different directories

The first version of the assembly:

var gulp = require('gulp'); var sourcemaps = require('gulp-sourcemaps'); var concat = require('gulp-concat'); gulp.task('myTask', function () { gulp.src([ './jquery/jquery-1.9.1.js', './jquery/jquery.cookie.js', './jquery/toastr.min.js' ]) .pipe(sourcemaps.init()) .pipe(concat({ path: 'bundle-jquery.js' })) .pipe(sourcemaps.write('.')) .pipe(gulp.dest('')); }); 

enter image description here

and if you look at the screen, you can see that all files are lying in the root. what is wrong. ps: here I do not add a hash to the file, because not working right

The second version of the assembly looks like this for me:

 var gulp = require('gulp'); var concatSource = require('gulp-concat-sourcemap'); var rev = require('gulp-rev'); gulp.task('myTask', function () { gulp.src([ './jquery/jquery-1.9.1.js', './jquery/jquery.cookie.js', './jquery/toastr.min.js' ]) .pipe(concatSource('bundle-jquery.js', { sourcesContent: true })) .pipe(rev()) .pipe(gulp.dest('')) .pipe(rev.manifest('bundle-jquery.json')) .pipe(gulp.dest('./manifests')); }); 

here there is an assembly through other plug-in and the same plug-in is engaged in a mapping, it feels good. but as soon as I want to rename the file (add a hash), then the old file name remains in the sour keyboard.

enter image description here

those. I need to manually correct the file name and everything starts to work correctly

enter image description here

can you help with this problem?

    0