A
A
Andrey Berezhnoy2015-12-23 22:13:04
gulp.js
Andrey Berezhnoy, 2015-12-23 22:13:04

How to grab files from Bower with Gulp?

How to automatically or at least semi-automatically pick up files from bower_components and copy them to the assets folder , subsequently performing certain operations with certain files?
Those. for example, I need to pick up jQuery from bower, but not compress it with the rest of the files, but for example Foundation Components I would like to build and minify.
Interested in the option without permanent editing gulpfile.js

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
timfcsm, 2015-12-23
@timfcsm

main-bower-files
I use something like this

gulp.task('bowerJS', function () {
  return del('src/js/vendor').then(function (paths) {
    return gulp.src(mainBowerFiles('**/*.js'))
        .pipe(gulp.dest('src/js/vendor'));
  }).catch(console.dir);
});

M
Maksim Zverev, 2015-12-23
@m1skam

Check out these packages:
main-bower-files
wiredep

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question