Book Image

Learning less.js

Book Image

Learning less.js

Overview of this book

Table of Contents (22 chapters)
Learning Less.js
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Watching for changes in Watch mode


In this exercise, we're going to take a look at a simple, but useful feature called the Watch mode. This allows us to make changes to any Less file while still in development, and for us to reload the page without having to force a complete reload of the page from the server. It is worth noting that the Watch mode can be used with the local filesystem, or with a web server—both will produce the same effect. For the purposes of the book, we will assume the use of the latter; in this case, we will use WampServer, which we covered back in Chapter 2, Building a Less Development Toolkit. If you are a Mac user, then you can use something such as MAMP; Linux users will have a selection of local web servers available within their distro.

We're going to test it by creating a simple form with the username and password fields.

Assuming that we have installed WAMP, or have web space available, start by opening up your text editor, then add the following code:

<!DOCType...