Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-ccr-each

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-ccr-each

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

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

gulp-ccr-each

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

Install

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

Recipe

Stream Array (from gulp-cheatsheet p.2)

Ingredients

Type

Stream Processor

API

config.values

An array of values to iterate. Injecting each value to sub tasks via their "config" context. Configuration of sub task can interpolate the value using template of "{{var}}" syntax. Since the value being passed to sub task via the "config" context, value must be of type "object".

Usage

var gulp = require('gulp');
var chef = require('gulp-chef');
var consolidate = require('gulp-consolidate').bind(null, 'nunjucks');

var meals = chef({
    'stream-array': {
        src: 'template/',
        dest: 'html/',
        each: {
            values: [{
                name: 'apple',
                title: 'Apple Cake',
                price: '25'
            }, {
                name: 'orange',
                title: 'Orange Cookie',
                price: '18'
            }],
            pipe: {
                '.consolidate': {
                    plugin: consolidate,
                    src: 'a.ejs',
                    options: {
                        title: '{{title}}',
                        price: '{{price}}'
                    }
                },
                '.rename': {
                    plugin: 'gulp-rename',
                    options: {
                        basename: '{{name}}',
                        extname: '.html'
                    },
                    spit: true
                }
            }
        }
    }
});

gulp.registry(meals);

Keywords

FAQs

Package last updated on 31 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc