Sign in

For the process of bundling the CSS and minifying the JS we use gulp. By bundling the CSS we can reduce the number of request made to the server when the website/application is loading.

We will be creating the following directory and file structure in our instance:

wwwroot/
|- css/
|- stylesheet-min.css
|- js/
|- jquery-min.css
|- main-min.css
wwwroot/
|- js/
|- jquery.js
|- main.js
|- css/
|- app.css
|- custom.css
gulpfile.js
package.json

Automating the process with Gulp.js
Before minifying our styles/scripts let us start with the bundling process.

Photo by Markus Spiske on Unsplash

Bundling Styles:

  • Before we start our gulp process we need to…

Benjamin

Front-End developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store