How to do it...

  1. First, we add Gulp to package.json and the Gulp plugins. Then we need to minify and bundle these two JavaScript files if this file doesn't exist in the web application:
  1. We add the gulp-concat plugin, which concatenates the (bundle) files, and then we add gulp-uglify, which minifies the .js files, removing whitespaces and comments, and writes the name of the module we want to add to the devDependencies section:
  1. Let's create a gulpfile.js (a gulp configuration file):
  1. The generated file contains the following code:

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.