fix(gen): change the timing that switch cordova command

switch cordova command when the task runs. share the Gruntfile in both
Windows and OS X have become possible.