From the course: Learning CoffeeScript
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Adding a default task and live reloading - CoffeeScript Tutorial
From the course: Learning CoffeeScript
Adding a default task and live reloading
Running a single task is just fine but eventually you're going to want things to happen more automatically. So let's go ahead and create a more streamline way to process our tasks and also set up live reloading. Now to do all this we're going to need to add some additional variables up here. So right at the end of the variable declaration I'm going to add some additional things. So, I'll need to add a new live reload variable here, and ask it to require. So we'll need to load the live reload module. And the live reload module also requires that you load in the tiny dash lr module as well. So I'll do require tiny-lr. And then we'll also need to create a server variable, and that is just going to be set to the lr method from this other library. Okay, the next thing I'm going to do is, I'm going to take the sources of my JavaScript document out of here, so I'll take this array and just take it out of there, and then up here, I'm going to just create it as a separate variable, so that's…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
What is CoffeeScript?3m 31s
-
Using online tools to process CoffeeScript2m 40s
-
(Locked)
Comparing installation options4m 23s
-
(Locked)
Setting up a project with Gulp.js9m 50s
-
(Locked)
Creating simple JavaScript automation7m 33s
-
(Locked)
Adding a default task and live reloading10m 47s
-
(Locked)
Processing Sass files8m 56s
-
(Locked)
Adding CoffeeScript7m
-
-
-