added grunt
added gruntfile
move code inside a closure and expose the method