# Gulp: the modern frontend factory

The gulpfile is organized in several tasks that you can execute from command line using gulp [task-name].

A task is defined using the gulp.task function. To define a task that prints "Hello World", it's as simple as

gulp.task('hello', function() {
console.log('Hello World');
});


gulp.task('hello1', function() {
console.log('Hello');
});

console.log('World');
});


Executing hello2 task will print Hello, then World.

The tasks defined in the dependency array are unordered. This allows Gulp to execute some of them simultaneously. While it could lead to sensible performance impovement by parralezing tasks, it could also be quite confusing if you want your raks to be ran one by one.

This code will try to print Hel and lo at the same time, so the order is unpredictable.

gulp.task('hello1', function() {
console.log('Hel');
});

console.log('lo');
});

console.log('World');
});


This one is better:

gulp.task('hello1', function() {
console.log('Hel');
});


gulp.task('compile', ['jade2html', 'coffee2js', 'less2css']);