Separate library code from grunt task