Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

can't upload on external save via SFTP #794

Closed
andreaarcher opened this issue Apr 15, 2016 · 4 comments
Closed

can't upload on external save via SFTP #794

andreaarcher opened this issue Apr 15, 2016 · 4 comments

Comments

@andreaarcher
Copy link

Hello,
on my most recent install of FP my "monitor file: upload on external save" doesn't work in SFTP (sublime plugin). It used to be that when I saved a linked css file the main one would compile and upload automatically. Now on my new build that has stopped working. In my sublime directory I see foundation.css and foundation.css.map slide in and out which seems to suggest that they are being closed and reopened- this doesn't happen on any of my earlier installs. I think that the closing is stopping the monitoring so it's not being saved after compilation. Does anyone know if there is a setting somewhere to fix this?

Thanks in advance

Andi

@shawnnaquin
Copy link

same issue.

@andreaarcher
Copy link
Author

@shawnnaquin -- if you figure this out please hit me up...

@shawnnaquin
Copy link

shawnnaquin commented May 20, 2016

@andreaarcher
so its because of the clean css and clean JS tasks.

gulp.task('clean:css', function() {
  return del([
      'assets/stylesheets/foundation.css',
      'assets/stylesheets/foundation.css.map'
    ]);
});

since the file is being deleted SFTP sees it as a new file and not an edited and currently monitored file.

I ended up using the gulp.watch task and gulp-sftp to reupload the file on create.

gulp.task('watch-scss', function() {
  sequence(['clean:css', 'sass'], 'sftp-css');
});

@andreaarcher
Copy link
Author

andreaarcher commented Jun 1, 2016

Perfect, that worked! Thanks

-I just have to remember to kill the current $npm run watch and start it again after I edit the file

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants