是否可以使用 gulp 插件将 bower `main` 文件放入特定文件夹?

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

是否可以使用 gulp 插件 main-bower-files.js 文件复制到一个特定的 javascript 文件夹?

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'));
});

这里是当前文件夹复制结果作为单独的文件夹与插件

gulp-main-bower-files returns 只有可以传递给 gulp.src() 的文件列表。

压缩目录树 b https:/st 插件是 https://github.com/armed/gulp-flatten