based on https://github.com/jquery/jquery-mobile/blob/master/Gruntfile.js#L639