O'Reilly logo

Microsoft Visual Studio 2015 Unleashed, Third Edition by Mike Snell, Lars Powers

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

Minify Your JavaScript with Gulp

We covered Gulp in Chapter 17 when discussing the ASP.NET 5 template. However, Gulp is a key component for working with your own, custom JavaScript files. You can use Gulp to copy, combine, and minify (and take similar actions) your development JavaScript files to files that will execute faster in production. We will use this approach through these remaining samples in this chapter. So let’s take a look at how you configure Gulp to minify a JavaScript file.

1. Start with an ASP.NET 5 Web Site template in Visual Studio. You can also view this sample from the code download for this book.

2. Gulp uses NPM for package management. The NPM configuration file is package.json. Open this file from Solution Explorer.

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