gulp-semiflat
v0.0.9
Published
Amend the base path of gulp vinyl files based on a Glob to produce a somewhat flatter file tree at the destination.
Downloads
8
Maintainers
Readme
gulp-semiflat
Amend the base path of gulp vinyl files based on a glob to produce a somewhat flatter file tree at the destination.
Install
Install with npm.
npm install --save-dev gulp-semiflat
Usage
var gulp = require('gulp');
var gulpSemiFlat = require('gulp-semiflat');
gulp.task('default', function () {
return gulp.src('js/**/lib/**/*.js') // base will be '/js'
.pipe(gulpSemiFlat('js/**/lib')) // base is now '/js/.../lib'
.pipe(gulp.dest('build/js');
});
Note that trailing ** in the glob will match the full path to the file. This will give the limiting case of gulp-flatten.