From f30fc3ad05ca4a14aa4252ff77156f77b2c9f8d0 Mon Sep 17 00:00:00 2001 From: James F McMahon Date: Mon, 27 Jul 2015 11:26:18 -0400 Subject: [PATCH] Docs: Clarify err usage --- docs/recipes/running-tasks-in-series.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/recipes/running-tasks-in-series.md b/docs/recipes/running-tasks-in-series.md index f9d4d49b3..756ce47b2 100644 --- a/docs/recipes/running-tasks-in-series.md +++ b/docs/recipes/running-tasks-in-series.md @@ -17,9 +17,11 @@ So this example would look like: var gulp = require('gulp'); // takes in a callback so the engine knows when it'll be done -gulp.task('one', function(cb) { +gulp.task('one', function (cb) { // do stuff -- async or otherwise - cb(err); // if err is not null and not undefined, the orchestration will stop, and 'two' will not run + fs.writeFile('filename', 'data', opts, function (err) { + cb(err); // if err is not null and not undefined, the orchestration will stop, and 'two' will not run + }); }); // identifies a dependent task must be complete before this one begins