Skip to content

Export all coffee classes with @

Created by: cirosantilli

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 @/'

And thanks to @Razer6 for teaching me that today.

Merge request reports

Loading