Skip to content

Instantly share code, notes, and snippets.

@perlDreamer
Created August 28, 2013 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save perlDreamer/6368697 to your computer and use it in GitHub Desktop.
Save perlDreamer/6368697 to your computer and use it in GitHub Desktop.
#CLI's
## Change control-group class to form-group
find . -name '*.tt' | xargs perl -pi -e 's/control-group/form-group/g;'
## Change span\d to col-sm-\d
find . -name '*.tt' | xargs perl -pi -e 's/class="span(\d+)/class="col-sm-$1/g;'
## Give submit buttons a default class of btn-primary
find . -name '*.tt' | xargs perl -pi -e 's/class="btn"/class="btn btn-primary"/g;'
## hidden input types need a class
find . -name '*.tt' | xargs perl -pi -e 's/type="hidden"/class="form-control" type="hidden"/g unless /class=/;'
#Manual's
## All pages with custom headers and footers should include the main header and footer to
## reduce copy/paste includes.
See var/init/views/account/{header,footer}_include.tt.
## form controls and input wrappers need individual width controls, for example
:1,$s/\<controls/col-sm-8
:1,$s/control-label/col-sm-4 control-label/
##Shortcuts
## Copy over /data/Wing/var/init/views/account/{footer,header}_include.tt /data/MyProject/views/account
## Restore any project customizations to the nav for account
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment