-
Notifications
You must be signed in to change notification settings - Fork 2
/
compass-convert.sh
42 lines (37 loc) · 3 KB
/
compass-convert.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# converts included compass vendor-prefix mixins to their normal css declarations
# created by Tonijn - Genkgo <a href="http://www.genkgo.com" />
usage() { echo "usage: [project folder root]"; exit 1; }
FOLDER="your-sass-folder"
DEST=$1$FOLDER
find . -name "config.rb" -exec rm -rf {} \;
sed -i '' '/@import \"compass/d' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include appearance(\(.*\))|appearance: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include background-size(\(.*\))|background-size: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include border-bottom-left-radius(\(.*\))|border-top-left-radius: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include border-top-left-radius(\(.*\))|border-bottom-left-radius: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include border-bottom-right-radius(\(.*\))|border-bottom-right-radius: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include border-top-right-radius(\(.*\))|border-top-right-radius: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include border-radius(\(.*\))|border-radius: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include box-shadow(\(.*\))|box-shadow: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include box-sizing(\(.*\))|box-sizing: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include columns(\(.*\))|columns: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include column-gap(\(.*\))|column-gap: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include column-count(\(.*\))|column-count: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include column-width(\(.*\))|column-width: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include filter(\(.*\))|filter: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include hide-text(\(.*\))|text-indent: -9999px; overflow: hidden; white-space: nowrap|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include hyphens(\(.*\))|hyphens: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include hyphenation(\(.*\))|word-break: break-all; hyphens: auto;|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include inline-block(\(.*\))|display: inline-block|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include opacity(\(.*\))|opacity: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include rotate(\(.*\))|rotate: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include text-shadow(\(.*\))|text-shadow: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include transition(\(.*\))|transition: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include transition-property(\(.*\))|transition-property: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include transition-duration(\(.*\))|transition-duration: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include transition-timing-function(\(.*\))|transition-duration: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include word-break(\(.*\))|word-break: \1|g' $(find ${DEST} -name '*.scss')
sed -i '' 's|@include pie-clearfix|@include clearfix|g' $(find ${DEST} -name '*.scss')
echo "conversion complete";
exit 1;