Sass watch command compiles .scss files before full sftp upload -
i use winscp download , edit .scss
files , sass on linux (on server) compile them .css
.
after saving file, use: sass scss/style.scss css/style.css
, replaces css file compiled sccs.
the problem
i want skip part return command line after editing scss file, sake of automation , saving time.
but, if use watch
command: sass --watch scss/style.scss:css/style.css
synchronize 2 files, alerts nonexistent css errors pop up:
change detected to: scss/style.scss error scss/style.scss (line 232: invalid css after "...ht: bold; line-": expected "{", "")
note that when file uploads quicker usual (sometimes happens) watch command job, no errors.
this because, when file upload takes time, sass compiles scss file (on server) before uploaded remote folder. thus, compiles part of file, resulting in css errors.
is there way set timer watch command waits few seconds after detects changes , before compiling?
any other way overcome is, of course, accepted!!
for 1 in billion facing same problem (i know out there), time answer tumbleweed:
the solution simple
do exact opposite:
- install ruby , sass on pc.
- tell sass watch changes between scss/css files locally with:
sass --watch scss/style.scss:css/style.css
- set winscp local dir on css folder watched sass.
- set winscp remote dir on css folder want edit.
- set winscp keep remote dir date commands > keep remote directory date menu.
that's it.
if edit , save local scss file, sass compile css, winscp detect change on css , automatically upload remote folder.
Comments
Post a Comment