Necessarily Precedes Mischief

    @hidoo/gulp-plugin-image-placeholder

    0.19.0 • Public • Published

    @hidoo/gulp-plugin-image-placeholder

    Plugin that add image of placeholder for gulp.

    Installation

    $ npm install --save-dev gulp@next @hidoo/gulp-plugin-image-placeholder

    Usage

    import {src, dest, task} from 'gulp';
    import imagePlaceholder from '@hidoo/gulp-plugin-image-placeholder';
    
    task('placeholder', () => src('/path/to/src')
      .pipe(imagePlaceholder())
      .pipe(dest('/path/to/dest')));

    Supported formats

    • PNG
    • JPEG
    • GIF
    • SVG

    API

    imagePlaceholder

    return placeholder image.

    Parameters

    • options Object option (optional, default {})

      • options.append Boolean append placeholder or not (optional, default true)
      • options.suffix String placeholder image suffix (optional, default 'placeholder')
      • options.verbose Boolean out log or not (optional, default false)

    Examples

    import {src, dest, task} from 'gulp';
    import imagePlaceholder from '@hidoo/gulp-plugin-image-placeholder';
    
    task('placeholder', () => src('/path/to/src')
      .pipe(imagePlaceholder({
        append: false,
        suffix: 'placehold',
        verbose: true
      }))
      .pipe(dest('/path/to/dest')));

    Returns DestroyableTransform

    Test

    $ yarn test

    License

    MIT

    Keywords

    Install

    npm i @hidoo/gulp-plugin-image-placeholder

    DownloadsWeekly Downloads

    42

    Version

    0.19.0

    License

    MIT

    Unpacked Size

    13.5 kB

    Total Files

    5

    Last publish

    Collaborators

    • hidoo