V
V
Vladislav2015-05-10 22:43:01
gulp.js
Vladislav, 2015-05-10 22:43:01

How to find minified js file using main-bower-files?

Installed jquery package using bower. I'm trying to copy its main files to the js folder using "main-bower-files", but only jquery.js is copied, and I need min as well.
Here is the code:
var gulp = require('gulp'),
mainBowerFiles = require('main-bower-files');
gulp.task('mainBowerFiles', function() {
var vendors = mainBowerFiles();
gulp.src(vendors)
.pipe(gulp.dest('./js'));
});
gulp.task('default', ['mainBowerFiles']);
I tried to specify in mainBowerFiles options
{
"overrides": {
"jquery": {
"main": "jquery.min.js"
}
}
}
But it doesn't work. What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
glinkap, 2016-06-19
@glinkap

Homsa Toft , you most likely read the documentation from another plugin from gulp-main-bower-files, and in the post we are talking about main-bower-files

H
Homsa Toft, 2015-05-11
@kostein

As I understand from the documentation in the options, you must specify links to bower.json and already write overrides in it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question