How it works...

Like Grunt, Gulp is a Node.js module that helps us to run frequent tasks in web development. For a lot of common tasks in web development, we could use both Grunt and Gulp. Grunt is older, file based, and has more plugins than Gulp (around 4,500). Gulp is younger, stream based, has more than 100 plugins, and is more performant, because it uses Node.js stream-asynchronous features.

Minifying and bundling are two mandatory tasks in web development before sending an application in a production environment.

In the older versions of MVC, to execute these tasks, we used to create bundles programmatically in C# for JavaScript and CSS files in the BundleConfig.cs file, stored in the App_Start folder:

This code creates two bundles, ...

Get ASP.NET Core MVC 2.0 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.