cookiecutter-django/docs/live-reloading-and-sass-compilation.rst

25 lines
824 B
ReStructuredText
Raw Normal View History

.. _sass-compilation-live-reload:
2018-03-09 21:17:56 +03:00
Sass Compilation & Live Reloading
=================================
2015-09-18 20:20:48 +03:00
If you'd like to take advantage of `live reload`_ and Sass compilation:
2015-09-18 20:20:48 +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/
- Now you just need::
2015-09-18 20:20:48 +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.
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`_
.. _live reload: http://livereload.com/
2017-07-31 16:57:33 +03:00
.. _appropriate browser extension: http://livereload.com/extensions/