简体   繁体   中英

Is it possible to put bower `main` files to specific folder with gulp plugin?

Is it possible to copy .js files to one specific javascript folder with gulp plugin main-bower-files ?

var gulp = require('gulp'),
    bower = require('gulp-bower'),
    mainBowerFiles = require('gulp-main-bower-files'),
gulp.task('mainbower', function() {
    return gulp.src('./bower.json')
        // .pipe(mainBowerFiles([[filter, ]options][, callback]))
        .pipe(mainBowerFiles())
        .pipe(gulp.dest('./wwwroot/libs'));
});

Here is the current folder copying result as separate folder with the plugin 👇

在此处输入图片说明

gulp-main-bower-files returns only list of files which can be passed to gulp.src().

To squash directories tree b https:/st plugin is https://github.com/armed/gulp-flatten

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM