Skip to content

Instantly share code, notes, and snippets.

@hankyates
Last active October 9, 2015 01:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hankyates/1edf2c1d61ef12c0d823 to your computer and use it in GitHub Desktop.
Save hankyates/1edf2c1d61ef12c0d823 to your computer and use it in GitHub Desktop.
its magic yo
find . -type f -exec sed -i -e 's%../app/%./%g' {} \;
find . -type f -exec sed -i -e 's%../build/%./views/%g' {} \;
find . -type f -exec sed -i '' -e 's%this.getDOMNode()%ReactDOM.findDOMNode(this)%g' {} \;
// osx sed -i expects an extension
// Illegal command try export LANG=C
@hankyates
Copy link
Author

find . -type f -exec sed -i -e 's%/** @jsx React.DOM */%%g' {} ;

@hankyates
Copy link
Author

find . -type f -exec sed -i '' -e 's%this.getDOMNode()%ReactDOM.findDOMNode(this)%g' {} ;
// osx sed -i expects an extension
// Illegal command try export LANG=C

@hankyates
Copy link
Author

find . -type f -exec jscodeshift -t findDOMNode.js {} ;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment