Angular Automation: Copy Assets with Gulp

Share this video with your friends

Send Tweet

In this lesson, we are going to learn how to copy assets from one place to another using Gulp. This is important as you start to prepare your source files to be deployed into production. We will learn how to implement gulp.src, gulp.pipe and gulp.dest as well as the del plugin as we copy our files from the source directory into a build directory.

Craig McKeachie
Craig McKeachie
~ 9 years ago

The del module now returns a promise so the clean task should now return the promise instead of taking a callback as follows:

gulp.task('clean', function () { return del(['./build'], {force: true}); });

returning a callback as the original screencast shows will simply now pause the build process after the clean task.

Shaun
Shaun
~ 9 years ago

Thanks Craig!

Steven Barnhurst
Steven Barnhurst
~ 9 years ago

You're a hero

Tri Logis
Tri Logis
~ 9 years ago

Thanks Craig!