2018-09-15 23:23:06 +03:00
|
|
|
.. _sass-compilation-live-reload:
|
|
|
|
|
2018-03-09 21:17:56 +03:00
|
|
|
Sass Compilation & Live Reloading
|
|
|
|
=================================
|
2015-09-18 20:20:48 +03:00
|
|
|
|
2018-09-01 13:43:07 +03:00
|
|
|
If you'd like to take advantage of `live reload`_ and Sass compilation:
|
2015-09-18 20:20:48 +03:00
|
|
|
|
2018-09-01 13:43:07 +03:00
|
|
|
- Make sure that nodejs_ is installed. Then in the project root run::
|
2015-09-18 20:20:48 +03:00
|
|
|
|
|
|
|
$ npm install
|
|
|
|
|
|
|
|
.. _nodejs: http://nodejs.org/download/
|
|
|
|
|
2018-09-01 13:43:07 +03:00
|
|
|
- Now you just need::
|
2015-09-18 20:20:48 +03:00
|
|
|
|
2018-03-06 19:46:21 +03:00
|
|
|
$ npm run dev
|
2015-09-18 20:20:48 +03:00
|
|
|
|
|
|
|
The base app will now run as it would with the usual ``manage.py runserver`` but with live reloading and Sass compilation enabled.
|
2018-09-01 13:43:07 +03:00
|
|
|
When changing your Sass files, they will be automatically recompiled and change will be reflected in your browser without refreshing.
|
2015-09-18 20:20:48 +03:00
|
|
|
|
|
|
|
To get live reloading to work you'll probably need to install an `appropriate browser extension`_
|
|
|
|
|
2018-09-01 13:43:07 +03:00
|
|
|
.. _live reload: http://livereload.com/
|
2017-07-31 16:57:33 +03:00
|
|
|
.. _appropriate browser extension: http://livereload.com/extensions/
|