December 2016
Intermediate to advanced
841 pages
17h
English
Now that the application has been implemented and tested, we can prepare it for release in a production environment.
In this section, we will implement two Gulp tasks. The first task is used to compress the output JavaScript code. Compressing the JavaScript code will improve both the loading and execution performance of our application:
gulp.task("compress", function() {
return gulp.src("bundled/source/bundle.js")
.pipe(uglify({ preserveComments : false }))
.pipe(gulp.dest("dist/"))
});The second Gulp task that we will implement is used to add a copyright header. The task uses some of the fields from the npm configuration file (package.json) to generate a string, which contains the copyright details. ...
Read now
Unlock full access