Transform gulp plugin into standard javascript task