1.0.3 • Published 8 years ago

gulp-sync-task v1.0.3

Weekly downloads
7
License
GPL-3.0
Repository
github
Last release
8 years ago

gulp-sync-task

A gulp plugin that is nothing less nor more but to sync tasks in gulp process

Install

git clone https://github.com/SalathielGenese/gulp-sync-task.git
npm install --save-dev gulp-sync-task
bower install --save-dev gulp-sync-task

Import

var gulp_sync_task = require('gulp-sync-task');

Make Use

var gulp = require('gulp');
var gulp_sync_task = require('gulp-sync-task');


gulp
// The end of this task is obvious: thanks to @gulp-team
.task('a', function() 
{
    return gulp.src('**/*.*');
})
// Can't say it for the next task. We need to call the 'callback' ourself
.task('b', function(callback)
{
    setTimeout(function()
    {
        /**
         * 
         * amazing stuffs
         * 
         **/
        gulp_sync_task.callback = callback; // callback(); // will also work
    }, 2500);
})
.task('sync', gulp_sync_task('a', 'b'));
gulp sync

Enjoy the output...

gulp_sync_task.callback

It just delegate the call of callback to this getter method.

Fear not! The value is not even registered.