GruntJS in Simple English Part2

Why we use grunt ?

What are the things grunt done ?

  1. Validate HTML/JS/CSS
  2. Compress CSS and JS
  3. Compile the CoffeeScript , TypeScript (mainly nowadays used for Angular2)..etc
  4. LESS to CSS

Grunt Architecture ?

Using package.json file we can described the Gruntjs file configurations. In format of metadata values described our requirements.

  • Sample package.json refer Sample Package.json
  • Another important file for gruntjs is Gruntfile.js
  • We can configure the grunt tasks which one first run which one second..
  • Sample Gruntfile.js refer sample grunt File
  • How to run single task in grunt
  • grunt taskName -v