Last active
December 10, 2015 22:28
-
-
Save maxpeterson/4502176 to your computer and use it in GitHub Desktop.
Fix require paths when migrating to jamjs
This file contains hidden or 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
| # Replace `lib/edetail` with `edetail` | |
| grep -rl 'lib/edetail' project | xargs sed -i '' -e "s|[\"']lib/edetail/\(.*\)[\"']|'edetail/\1'|" | |
| # Replace `underscore` with `lodash` | |
| grep -rl 'lib/require-underscore/wrapper' project | xargs sed -i '' -e "s|[\"']lib/require-underscore/wrapper[\"']|'lodash'|" | |
| # Replace `backbone` with `backbone-zepto` | |
| grep -rl 'lib/require-backbone/wrapper' project | xargs sed -i '' -e "s|[\"']lib/require-backbone/wrapper[\"']|'backbone-zepto'|" | |
| # Replace `zepto` plugins | |
| grep -rl 'lib/require-zepto/.*' project | xargs sed -i '' -e "s|[\"']lib/require-zepto/\(.*\)[\"']|'\1'|" | |
| # Replace require wrappers | |
| grep -rl 'lib/require-.*/wrapper' project | xargs sed -i '' -e "s|[\"']lib/require-\(.*\)/wrapper[\"']|'\1'|" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment