gulp-semiflat

0.0.9 • Public • Published

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.9
    3
    • latest

Version History

Package Sidebar

Install

npm i gulp-semiflat

Weekly Downloads

3

Version

0.0.9

License

MIT

Last publish

Collaborators

  • bholloway