Skip to content

Instantly share code, notes, and snippets.

@dcharbonnier
Created November 9, 2016 09:39
Show Gist options
  • Save dcharbonnier/9d7dab7400538f21c33efda48b2c7d36 to your computer and use it in GitHub Desktop.
Save dcharbonnier/9d7dab7400538f21c33efda48b2c7d36 to your computer and use it in GitHub Desktop.
export
ls|grep -v index|grep \.ts|while read f;do echo -n "export { ";cat $f|grep 'export '|sed -e 's/\s*export \([a-z]\+\) \([A-Za-z0-9]\+\).*/\2/g'|xargs echo -n| sed -e 's/ /,/g'; echo " } from \"`echo -n $f|sed 's/\.ts//g'`\"" ; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment