You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

gulp-diff-build

Package Overview
Dependencies
3
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-diff-build

run tasks only if src files are changed


Version published
Maintainers
1
Created

Readme

Source

build status

gulp-diff-build

gulp module to stream files only if target files are changed.

Getting Started

Install

$ npm install gulp-diff-build --save-dev

Usage

This task will keep a hash reference of target files and run defined tasks only if files changed. File hashes will be saved in .gulp/gulp-diff-build/hash.json. You might like to add .gulp to your .gitignore.

const diff = require('gulp-diff-build');

const SRC = 'src';
const DEST = 'dist';

gulp.task('default', () => {
    gulp.src(SRC)
        .pipe(diff())
        .pipe(gulp.dest(DEST));
});

Options

clear

Type: bool Default value: false

flush hash file when running with clear option value: true

clearAll

Type: bool Default value: false

flush all hash files when running with clearAll option value: true

dest

Type: string or array Default value: undefined

option to filter streaming files. This task will stream only files that match given paths into the gulp stream. If it is undefined, all files will be passed.

hash

Type: string Defualt value: 'hash'

options to define filename of hash references for multi tasking or multi cache control. files of hash references will be saved as .gulp/gulp-diff-build/[givenName].json.

Example

example of building sass.

gulp task watch all of sass src files and stream only main.sass and main-sp.sass into sass() task.

const diff = require('gulp-diff-build');

gulp.task('default', () => {
    gulp.src('src/sass/**/*.sass')
        .pipe(diff({
            clean: true,
            dest: [
                'src/sass/main.sass',
                'src/sass/main-sp.sass'
            ],
            hash: 'sass'
        }))
        .pipe(sass()),
        .pipe(gulp.dest('dest'));
});

License

The MIT License (MIT)

Copyright 2016~ moshisora

Keywords

FAQs

Package last updated on 06 Feb 2018

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc