I am working on a SASS project for an efficient code writing. Everything was good until I was working on my local system, but now I have uploaded the files to server and every time I need to make edits, I need to work on my local and then re-upload to server, which is so time consuming. Is there any other way to reduce this time and instead re-uploading the files, I can edit the SASS files online? Would like to know from you guys.
Asked
Active
Viewed 1,871 times
1
-
You cannot compile to sass on the live server unfortunately. I find this process tedious as well. – Korgrue May 24 '17 at 14:44
-
2You should be using a version control system... something like Git to commit your SASS files and if your server allows it (mine does) compiling your SASS into CSS should be part of your Build process. – Robert Wade May 24 '17 at 19:24
-
Thank you for your responses, Appreciated the both. – Pankaj Thakur May 25 '17 at 15:34
-
You dont need any of your SASS or LESS files on your server. Run a copy of your website on local host, compile your files and send the CSS up – Brad May 25 '17 at 23:05
-
Yes, I think this is the only way now, thanks @Brad – Pankaj Thakur May 26 '17 at 09:17
3 Answers
2
I agree with @RobertWade that this should be part of your version control and build process. You may like to start with a simple gulp sass build process running on your server. Here's a walkthrough http://ryanchristiani.com/getting-started-with-gulp-and-sass/

LWilson
- 444
- 2
- 11
-
-
I find it a bit redundant to set up all the robust environment with local copy, node, gulp watch and git for few simple edits on one website and next time on another. With specific problems related to your specific local environment. Truth is, that when no sass is present, you can fix things superfast only on the remote (NppFTP for instance) with no local copy. I can imagine a solution existing on filesave either on my system or on the server... – Fanky Jan 08 '21 at 17:19
2
In theory you can edit, but it won't compile in CSS. For that you should start your Compass/Gulp or whatever you using on local machine, upload CSS files and only then it will display changes in your browser. For live upload you can use Gulp-SASS and Gulp-SFTP. Gulp will watch files and upload them on change to the server. Here is an article, may be it will be usefull for you

Eugene Mikhushkin
- 155
- 2
- 10