gulp-ccr-each-dir

Iterates each sub directories and pass to sub tasks. A cascading configurable gulp recipe for gulp-chef.

Usage no npm install needed!

<script type="module">
  import gulpCcrEachDir from 'https://cdn.skypack.dev/gulp-ccr-each-dir';
</script>

README

gulp-ccr-each-dir

Iterates each sub directories and pass to sub tasks. A cascading configurable gulp recipe for gulp-chef.

Install

$ npm install --save-dev gulp-chef gulp-ccr-each-dir

Recipe

Stream Array (from gulp-cheatsheet p.2)

Ingredients

Type

Stream Processor

API

config.src

The directory path to iterate its sub directories. Inject "config.dir" and "config.path" context to sub tasks.

[expose] config.dir

The name of the sub directory.

[expose] config.path

The canonical path of the sub directory.

Usage

var gulp = require('gulp');
var chef = require('gulp-chef');

var meals = chef({
    src: 'src/',
    dest: 'dist/',
    'each-dir': {
        src: 'modules/',
        browserify: {
            bundle: {
                entry: '{{dir}}/index.js',
                file: '{{dir}}.js'
            }
         }
    }
});

gulp.registry(meals);

References

License

MIT

Author

Amobiz