Created
September 27, 2018 16:14
-
-
Save wongyouth/d037904fecabd9d2a69a51d7d7a88a5c to your computer and use it in GitHub Desktop.
用于 nideshop-mpvue 原生转mpvue用
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed -i '' \ | |
-e 's/that\.data/that/' \ | |
-e 's/this\.data/this/' \ | |
-e 's/that\.setData(/Object.assign(that.$data, /' \ | |
-e 's/this\.setData(/Object.assign(this.$data, /' \ | |
-e 's!//\([^ ]\)!// \1!' \ | |
-e 's/function(/function (/' \ | |
-e 's/^\( *\)\([^ (.]\{1,\}\)(/\1\2 (/' \ | |
-e 's/ == / === /' \ | |
-e 's/ *;? *$//' \ | |
-e 's/^\( *\)view\./\1./' \ | |
-e 's/wx:if/v-if/' \ | |
-e 's/wx:for/v-for/' \ | |
-e 's/wx:key/:key/' \ | |
-e 's/bindtap/@click/g' \ | |
-e "s/'{{\(.*\)}}'/'\1'/g" \ | |
$1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment