Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
development:grunt [2016/07/01 14:23] – [grunt lessToSass] crhallberg | development:grunt [2016/07/08 15:14] – [Grunt Manual] crhallberg |
---|
| |
[[http://gruntjs.com/|Grunt]] is a javascript and nodejs based task runner. It has been configured to run several tasks for front end manipulation and packaging. The file has been left simple in order to be easy to edit. You will have to edit Gruntfile.js (root folder) in order to get these scripts to work for custom themes. For more advanced methods, please see our [[development:grunt:scripts|community scripts page]]. | [[http://gruntjs.com/|Grunt]] is a javascript and nodejs based task runner. It has been configured to run several tasks for front end manipulation and packaging. The file has been left simple in order to be easy to edit. You will have to edit Gruntfile.js (root folder) in order to get these scripts to work for custom themes. For more advanced methods, please see our [[development:grunt:scripts|community scripts page]]. |
| |
| To setup Grunt to run, first install node and run "npm install" to install all the dependencies in package.json. |
| |
===== Default ===== | ===== Default ===== |
Specifically, it creates a compressed file that includes jquery, bootstrap.js, then all vendor files except for bootstrap-slider.js (not compatible with "use strict" required for compression), and finally autocomplete.js. | Specifically, it creates a compressed file that includes jquery, bootstrap.js, then all vendor files except for bootstrap-slider.js (not compatible with "use strict" required for compression), and finally autocomplete.js. |
| |
To compress your own code: refer to the [[https://github.com/gruntjs/grunt-contrib-uglify|grunt-contrib-uglify documenation]] or base your subtask on vendor_min. You can run specific js compression subtasks like this: | To compress your own code: refer to the [[https://github.com/gruntjs/grunt-contrib-uglify|grunt-contrib-uglify documentation]] or base your subtask on vendor_min. You can run specific js compression subtasks like this: |
<code>grunt uglify:vendor_min</code> | <code>grunt uglify:vendor_min</code> |
| |