Extract gruntExec method from preview process