Skip to content

Instantly share code, notes, and snippets.

@nicksteffens
Last active February 10, 2020 21:31
Show Gist options
  • Save nicksteffens/7de0bd8fff2f816fc66724903b2e92c1 to your computer and use it in GitHub Desktop.
Save nicksteffens/7de0bd8fff2f816fc66724903b2e92c1 to your computer and use it in GitHub Desktop.
Script to move pod structure to classic
#!/bin/bash
echo "Updating Template Path Reference..."
sed -ie "s+./template+../templates/components/$1+g" "addon/components/${1}/component.js"
rm addon/components/"${1}"/component.jse
echo "Migrating component $1 back to classic structure..."
git mv "addon/components/${1}/component.js" "addon/components/${1}.js"
git mv "addon/components/${1}/template.hbs" "addon/templates/components/${1}.hbs"
echo "Migrating 'App' reference"
sed -ie "s+fluid/components/${1}/component+fluid/components/$1+g" "app/components/${1}.js"
rm add/components/"${1}".js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment