Skip to content

Instantly share code, notes, and snippets.

@heyjinkim
Created September 19, 2015 00:13
Show Gist options
  • Save heyjinkim/c4df2e2943c5cc619ebe to your computer and use it in GitHub Desktop.
Save heyjinkim/c4df2e2943c5cc619ebe to your computer and use it in GitHub Desktop.
ember-watson-2.0.sh
# Using `Ember.HTMLBars.makeBoundHelper` is deprecated. Please refactor to using `Ember.Helper` or `Ember.Helper.helper`. [deprecation id: ember-htmlbars.make-bound-helper]
IFS=$'\n'
for pp in $(grep -R 'Handlebars.makeBoundHelper' * | awk -F':' '{print $1" "$2}')
do
filename=$(echo $pp | awk '{print $1}')
searchStr=$(echo $pp | awk '{print $2" "$3" "$4" "$5}')
newStr=$(echo $searchStr | sed 's/}}/ }}/g' | awk '{print $1" "$4" as |"$2"|}}"}')
echo "sed -i '' 's/Handlebars.makeBoundHelper/Helper.helper/g' $filename" >> ember-convert-helper-syntax.sh
done
#
IFS=$'\n'
for pp in $(grep -R '\.@each' * | awk -F':' '{print $1" "$3}')
do
filename=$(echo $pp | awk '{print $1}')
searchStr=$(echo $pp | awk '{print $2" "$3" "$4" "$5}')
newStr=$(echo $searchStr | sed 's/}}/ }}/g' | awk '{print $1" "$4" as |"$2"|}}"}')
echo "sed -i '' 's/.\@each/.[]/g' $filename" >> ember-convert-each-computed-syntax.sh
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment