howi (2) [Avatar] Offline
When I made the update in 3.2.4 ( pg 51 of MEAP v04) the following error is thrown :

throw new assert.AssertionError({
AssertionError: Task never defined: tests

for reference, I am currently using:
Gulp Vesrion:
--CLI version 0.4.0
--Local version 4.0.0-alpha.2

I have noted discussions on Gulp's github forums relating to the "allowance of forward references " ( see
and It seems that by simply re organizing the code and placing
gulp.task('test'..... ); 
 gulp.task('scripts'..... );
the error does goes away.

However, I would like to know if this is the intended practice that you wanted to convey in the book ? or is there something I might have overlooked ,and missing from my Gulp file , that would allow "forward referencing" and the use of the Series/Parallel API ?

Also note the discussion in the said forum on the use of Series/Parallel as opposed to defining functions outright and calling them.

PS .Stefan I am really enjoying the straight forward approach of your book so far.....
462633 (1) [Avatar] Offline
I had the same problem as above, and found the same result – the 'test' task must be above the 'scripts' task in gulpfile.js.

However, there are also several sloppy mistakes in the code in Listing 3.3 on page 51. This chapter says we can use the code we wrote in chapter 2, but...

1) The 'scripts' function as listed here is missing the call to .pipe(uglify())

2) This script here calls 'tests' but the task we wrote in ch. 2 is called 'test' (singular not plural)

3) The ! is missing from the gulp.src string params, but should still be there '!app/scripts/vendor/**/*.js'

I had to dig into the ch3 branch in the git repo to verify that last one.

I also noticed that the git repo version of gulpfile.js uses a different minify module than waw used in chapter 2. I'm not sure if that's important yet but will presumably find out as I keep reading.
var minifyCSS = require('gulp-minify-css');