Answer the question
In order to leave comments, you need to log in
How to properly organize the main-bower-files task using Gulp?
There is a gulp project, with the help of bower I want to organize a task so that main-bower-files goes through files with the extension .js or .min.js (if there are any in the library) and, accordingly, takes only one file.
I tried to organize using a variable and use "false" when the file is not found and "true" when it is found and go to the search for another, there was also an idea using the switch-case construct, but all in vain. Please help if anyone has encountered such a situation or knows how to solve it, since the code built into the task, in my opinion, is not executed as it should; everything works but the files do not appear in the directories.
gulp.task('bower',function(){
return gulp.src(bower())
var isDone = false;
while(isDone == false){
if('*.css') gulp.dest(path.css)
else if ('*.min.js') gulp.dest(path.plugins), isDone = true
else if ('*.js') gulp.dest(path.plugins), isDone = true
}
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question