Grunt in Rogo


Grunt is now used by Rogo to do certain tasks quickly, such as minimifying Javascript and CSS.

How to install

  1. Install npm
  2. Install the Grunt cli using: 

  3. From the Rogo root directory install the npm packages for Rogo: 

How to use

If you run the following command from the root Rogo directory: 

Grunt will run all it's default tasks which at the current time include:

  • Minifying all the CSS files from css/source and placing them in the css directory
  • Lint checking all the source JavaScript files in the admin directory (i.e. in  */js/source)
  • Minify all the source JavaScript files in the admin directory and place them as .min.js files inside the appropriate js folder.

It is also possible to run a subset of the Grunt tasks by specifying a task explicitly, for example: 

will only minify all the CSS.

To find out which tasks are available examin the Gruntfile.js and look for grunt.registerTask() calls

Documentation