-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bash_extra
37 lines (30 loc) · 920 Bytes
/
.bash_extra
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
# PHPUnit
alias pu="vendor/phpunit/phpunit/phpunit"
# Sass compiler that prefixes css, minifys and convert from SCSS to CSS
function sassc(){
if [ -z "$1" ]; then
printf "sassc takes two parameters none given - sassc <input-scss> <output-css>"
return
fi
if [ -z "$2" ]; then
printf "sassc takes two parameters one given - sassc <input-scss> <output-css>"
return
fi
if [ ! -z `command -v node-sass` ]; then
npm uninstall -g -q node-sass
fi
if [ -z `command -v sass` ]; then
printf "Installing Sass...\n"
npm install -g -q sass
fi
if [ -z `command -v postcss` ]; then
printf "Installing PostCSS CLI...\n"
npm install -g -q postcss-cli autoprefixer
fi
sass --style=compressed $1 $2
postcss "$2" --use autoprefixer -o "$2" # Automatically adds prefixes to the css rules
}
# Homestead (For Laravel Homestead / Vagrant)
function homestead() {
( cd ~/Homestead && vagrant $* )
}