-
Book Overview & Buying
-
Table Of Contents
LESS WEB DEVELOPMENT COOKBOOK
By :
In this recipe, you will add the watch plugin. This plugin enables you to watch files and folders for any changes and execute certain tasks upon any change. In this recipe, you will add the watch task to watch for changes in the development folder and trigger the Less task every time any of the Less files is changed.
The only requirement for this recipe is to have the watch plugin installed and loaded in your Gruntfile.js file. If you have not installed this plugin in the Installing Grunt plugins recipe of this chapter, you can do this using the following command in the root of your project:
$ npm install grunt-contrib-watch --save-dev
In order to add the watch configuration, add the following lines to your Gruntfile.js file after the Less task configuration:
watch: {
dev: {
options: {
livereload: true
},
files: ['<%=app.dev%>/**', '!<%= app.dev %>/css...
Change the font size
Change margin width
Change background colour