Gulp

The Gulp tasks we have at the moment are gulp sass:compile, which compiles our Sass, gulp sass:watch, which compiles our Sass and watches for changes, and finally gulp serve, which boots up a server, opens a tab in the browser and loads our project into it (if there is not already a tab open on localhost:3000), and then watches for changes to our SCSS files and html files and compiles our Sass and refreshes the browser.

This is the task that we'll use the most. So let's make it our default task. Open the gulpfile.js and add the following task:

/** 
 * Default Task 
 * 
 * Runs `gulp serve` 
 */ 
gulp.task('default', ['serve']); 

Now we only need to use the command:

gulp

Run it from the command line and our serve task will be run.

Adding jQuery

We'll require ...

Get Mastering Sass 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.