In this post I will cover some area of grunt more of a grunt basic tutorial, things you can do with grunt, in previous post we saw how we use grunt with Visual Studio 2012 and 2013 and our simple hello world task.

Let’s start with some more basic things e.g writing a simple function task that takes a parameter.
For example below we have a hello task that takes a parameter of name.

Note: we are using : to pass in parameters, if you have multiple parameters you can chain it with more colon (e.g grunt hello:Taswar:123456 ) it will pass it into the second parameter.

We can also provide a warning message when a parameter is not passed.

Now what if we want to chain the task together, hello and hello2, we can register a task for it

So far so good, but we can also document our task so that anyone using our task will have some description of the task.

If we run the grunt -h command we will see something like

GruntHelp

GruntHelp

So far we have covered more of the basics of grunt, the next blog post I will cover more in details of manipulating files etc in your system using grunt.