gf

gulp-folders

Gulp plugin that lets you work with folders

Showing:

Popularity

Downloads/wk

1K

GitHub Stars

9

Maintenance

Last Commit

4yrs ago

Contributors

5

Package

Dependencies

1

Size (min+gzip)

2.9KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Build Status

gulp-folders

Greenkeeper badge

Gulp plugin that lets you work with folders and treat them as package names

Install

npm install gulp-folders --save-dev

Rationale

This gives you a perfect solution to build different packages out of folders. Given this structure:

path
  to
    folder
      main
        jquery.js
        ember.js
      secondary
        plugin.js

it is very easy to build

dist
  folder
    main.js
    secondary.js

Usage

var gulp = require('gulp'),
    path = require('path'),
    folders = require('gulp-folders'),
    pathToFolder = 'path/to/folder';

gulp.task('task', folders(pathToFolder, function(folder){
    //This will loop over all folders inside pathToFolder main, secondary
    //Return stream so gulp-folders can concatenate all of them
    //so you still can use safely use gulp multitasking

    return gulp.src(path.join(pathToFolder, folder, '*.js'))
        .pipe(concat(folder + '.js'))
        .pipe(gulp.dest('dist'));
}));

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial