Skip to content
Edward Comley edited this page Apr 19, 2016 · 1 revision

Gruntfile.js

The grunt file lists a number of tasks to move/process files into app specific locations which differ between rails and django.

  • Copy
    • Copies fonts to /public/fonts/
    • Copies images to /public/images/
  • Sass
    • Creates public/css/main.css (based on public/sass/main.scss)
    • Creates public/css/main.min.css (based on public/sass/main.scss)
  • csscount
    • Each time main.css is generated (ie. something changes inside main.scss) csscount will calculate the number of selectors generated. If it exceeds 4000 selectors it flags an alert on the command line.
  • concat
    • Collects all necessary javascript for the project and concatenates them into a single file public/js/main.js
  • uglify
    • Optimises main.js into public/js/main.min.js
  • watch
    • Watches the /public/sass/ directory for any changes. Each change to a sass file inside this directory will start the sass build task and csscount task again.

Rails Version

Django Version

To start grunt tasks

Using terminal in the root of your project run:

grunt

Integration

Clone this wiki locally