gitlabhq/gitlabhq — pull request #8110 by cirosantilli (2014-10-20 21:09:51+00:00)
Title: Export all coffee classes with @

DRY, uniform.

find . -iname "*.coffee" | xargs perl -0777 -pi -e 's/^(class )([^@].*[^\n]\n)\n+(@|this)[^\n]+\n*(?=\n|$)/\1@\2/s'
find . -iname "*.coffee" | xargs perl -lapi -e 's/^class window\./class @/'