O'Reilly logo

Continuous Integration, Delivery, and Deployment by Sander Rossel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Putting it all together

By now, you are probably wondering if it is all worth it. There is just so much to do, with so many plugins and so many tasks and dependencies. Well, fear not. We can combine a lot of tasks in one task to make it easier.

We are going to do all of our JavaScript-related tasks in a single task. We now have the tasks lint, browserify, minify-js, test, and test-min. Unfortunately, the lint and test steps need to remain separate, but we can Browserify and minify in the same step. To run additional plugins after Browserify, we need to buffer the vinyl streams using the vinyl-buffer module:

npm install vinyl-buffer --save-dev

After that, we can just pipe browserify, source, buffersize, minify, and dest in a single task: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required