-
-
Save fay/9614747 to your computer and use it in GitHub Desktop.
migrate bootstrap 2.x to 3.x
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 "s/span\([0-9][0-9]*\)/col-md-\1/g" `ack-grep --type=html -l "span\d+"` | |
sed -i "s/row-fluid/row/g" `ack-grep --type=html -l "row-fluid"` | |
sed -i "s/offset\([0-9][0-9]*\)/col-md-offset-\1/g" `ack-grep --type=html -l "offset\d+"` | |
# need to revert the `icon-bar` | |
sed -i "s/icon-/glyphicon glyphicon-/g" `ack-grep --type=html -l "icon-"` | |
sed -i "s/btn-mini/btn-xs/g" `ack-grep --type=html -l "btn-mini"` | |
sed -i "s/btn-small/btn-sm/g" `ack-grep --type=html -l "btn-small"` | |
sed -i "s/btn-large/btn-lg/g" `ack-grep --type=html -l "btn-large"` | |
sed -i "s/class=\"btn\"/class=\"btn btn-default\"/g" `ack-grep --type=html -l "class=\"btn\""` | |
sed -i "s/control-group/form-group/g" `ack-grep --type=html -l "control-group"` | |
sed -i "s/checkbox inline/checkbox-inline/g" `ack-grep --type=html -l "checkbox inline"` | |
sed -i "s/radio inline/radio-inline/g" `ack-grep --type=html -l "radio inline"` | |
sed -i "s/input-prepend/input-group/g" `ack-grep --type=html -l "input-prepend"` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment