JSPM

gulp-folders-4x

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 165
  • Score
    100M100P100Q87860F
  • License MIT

Gulp plugin that lets you work with folders and treat them as package names, forked from https://github.com/hakubo/gulp-folders to support gulp 4.x

Package Exports

  • gulp-folders-4x

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gulp-folders-4x) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Build Status

gulp-folders (forked to support gulp 4.x)

All credits to the original creator. Here just to fork and make it works for gulp 4

Greenkeeper badge

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

Install

npm install gulp-folders-4x --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-4x'),
    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'));
}));