I am trying to enter all js files into the weebroot folder (except for those that are in lib), and after starting the task, it says that all the files have been entered. However, nothing similar happens. This is my task:
gulp.task('index', function () { var target = gulp.src('Views/Shared/_Layout.cshtml'); var sources = gulp.src(["./wwwroot/**/*.js", "!./wwwroot/lib/**"], { read: false }); return target.pipe(inject(sources)) .pipe(gulp.dest('/Views/Shared')); });
The strangest thing is that he worked once. I asked my colleague for help, and when she stood behind me, she seemed to work, but the problem was that she seemed to work many times because I suddenly had a lot of scripts and I deleted them. The next time I started the task, the _Layout.cshtml file remained unchanged. I have this in my html head:
I saw other messages ( Gulp inject not working ) with this problem, but they say that it was solved by transferring the result to a file, which I think I do at the end of the task
EDIT: Find out what happened. I missed. "" in front of the track. He worked with "./Views/Shared ..."
source share