File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 1- #! /usr/bin/sh
1+ #! /usr/bin/env bash
22
3- filename=${1}
4- # don't generate source maps
5- sass_args=" --no-source-map"
3+ # defaults
4+ import_path=" "
65
76usage () {
87 echo " Start watching for changes and compile emmidiately"
98 echo " filename.scss to filename.css"
10- echo " Usage: ${0} <filename.scss>"
9+ echo " Usage: ${0} <filename.scss> [import_path]"
10+ echo " import_path - load-path arg to sass binary"
1111}
1212
13- if [[ -z " $filename " ]]; then
13+ if [[ -z " $1 " ]]; then
1414 usage
1515 exit 1
1616fi
17+ filename=${1}
18+
19+ if [ -n " $2 " ]; then
20+ import_path=" ${2} "
21+ fi
1722
1823# remove the longest suffix starting with "."
1924base=${filename%% \. * }
2025echo " Compiling $filename to ${base} .css"
21- sass ${sass_args} --watch ${filename} :${base} .css
26+
27+ sass \
28+ --no-source-map ` # don't generate source maps` \
29+ --load-path=" ${import_path} " \
30+ --watch ${filename} :${base} .css
Original file line number Diff line number Diff line change 1- @import " /home/kip/.cache/wal/ colors.scss" ;
1+ @import " colors.scss" ;
22
33$background-color : $color0 ; // main background color
44$color : $color7 ; // main font color
You can’t perform that action at this time.
0 commit comments