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:

  1. install ruby , sass on pc.
  2. tell sass watch changes between scss/css files locally with:sass --watch scss/style.scss:css/style.css
  3. set winscp local dir on css folder watched sass.
  4. set winscp remote dir on css folder want edit.
  5. 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

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -