Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
rename a phoenix project
set -e
ack -l $CURRENT_NAME | xargs sed -i '' -e "s/$CURRENT_NAME/$NEW_NAME/g"
ack -l $CURRENT_OTP | xargs sed -i '' -e "s/$CURRENT_OTP/$NEW_OTP/g"
mv lib/$CURRENT_OTP lib/$NEW_OTP
mv lib/$CURRENT_OTP.ex lib/$NEW_OTP.ex
Copy link

jonathan-soifer commented Apr 8, 2017

Minor (possibly irrelevant) typo: CURRENT_NAME="CurentName"

Whoever uses this script will replace the names for their own use case but maybe you would like to know 😄

Copy link

skanel commented Sep 24, 2017

can this apply for phoenix 1.3.0?

Copy link

rubysolo commented Oct 5, 2017

For phoenix 1.3, you'll want to make sure that you also rename the lib/*_web directory and the lib/*_web.ex file.

Copy link

kumekay commented Dec 27, 2017

can this apply for phoenix 1.3.0?

Here is a fork updated for Phoenix 1.3

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